wappcode / gql-pdss-skeleton
此包最新版本(2.0.0)没有提供许可证信息。
Skeleton Graphql + Doctrine
2.0.0
2024-01-04 17:37 UTC
Requires
- wappcode/gqlpdss: ^3.0
This package is not auto-updated.
Last update: 2024-09-26 20:52:26 UTC
README
安装
composer create-project wappcode/gql-pdss-skeleton
创建 config/doctrine.local.php 文件,配置数据库
<?php
return [
"driver" => [
'user' => '',
'password' => '',
'dbname' => '',
'driver' => 'pdo_mysql',
'host' => '127.0.0.1',
'charset' => 'utf8mb4'
],
"entities" => require __DIR__ . "/doctrine.entities.php"
];
使用命令启动API
php -S localhost:8000 public/index.php
查询API Graphql的路径是 https://:8000/api
配置为api graphql,rest不使用doctrine
修改 public/index.php
// ....
// Actualizar la siguiente linea
$app = new GPDApp($context, $router, $enviroment, $withOutDoctrine = true);
// ....
无需创建 config/doctrine.local.php 文件,也无需创建数据库