Node
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
NODE_ENV=development
|
||||
PORT=8765
|
||||
DB_HOST=62.93.60.19
|
||||
DB_PORT=3306
|
||||
DB_NAME=testapi
|
||||
DB_USER=testapi
|
||||
DB_PASSWORD=sw]vV-VCvDjiahu3
|
||||
@@ -1,7 +0,0 @@
|
||||
NODE_ENV=development
|
||||
PORT=8765
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_NAME=my_app
|
||||
DB_USER=my_app
|
||||
DB_PASSWORD=
|
||||
+2
-14
@@ -1,12 +1,3 @@
|
||||
# CakePHP specific files #
|
||||
##########################
|
||||
#/config/app_local.php
|
||||
#/config/.env
|
||||
/logs/*
|
||||
/tmp/*
|
||||
/uploads/*
|
||||
/vendor/*
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
@@ -22,9 +13,6 @@ Thumbs.db
|
||||
|
||||
# Tool specific files #
|
||||
#######################
|
||||
# PHPUnit
|
||||
.phpunit.cache
|
||||
tests.sqlite
|
||||
# vim
|
||||
*~
|
||||
*.swp
|
||||
@@ -48,8 +36,8 @@ nbproject/*
|
||||
.sass-cache/
|
||||
# node
|
||||
/node_modules/*
|
||||
.env
|
||||
.env.*
|
||||
#.env
|
||||
#.env.*
|
||||
!.env.example
|
||||
# yarn
|
||||
yarn-debug.log
|
||||
|
||||
@@ -64,5 +64,3 @@ Listy obsługują `page`, `limit` (domyślnie 20, maksymalnie 100), `sort` i `di
|
||||
- Sukces: `{"success": true, "data": ...}`; odpowiedź z listą zawiera także `meta`.
|
||||
- Błąd walidacji: `{"success": false, "error": {"code": 422, "message": "Validation failed.", "fields": {...}}}`.
|
||||
- Usunięcie: `204 No Content`.
|
||||
|
||||
Migracja nie modyfikuje plików PHP; można je usunąć osobno po przełączeniu i sprawdzeniu wdrożenia Node.js.
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ const YAML = require('yamljs');
|
||||
const apiRouter = require('./routes/api');
|
||||
|
||||
const app = express();
|
||||
const openApiPath = path.resolve(__dirname, '../webroot/openapi.yaml');
|
||||
const openApiPath = path.resolve(__dirname, 'openapi.yaml');
|
||||
const openApiDocument = YAML.parse(fs.readFileSync(openApiPath, 'utf8'));
|
||||
|
||||
app.disable('x-powered-by');
|
||||
|
||||
Reference in New Issue
Block a user