Advertisement
crutch12

0001-BACKEND-FIXES.patch

Dec 25th, 2019
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. From 5c80613b38c34a98a662c42997f179ecdf04a19a Mon Sep 17 00:00:00 2001
  2. From: criitch <criitch@yandex.ru>
  3. Date: Wed, 25 Dec 2019 14:09:17 +0300
  4. Subject: [PATCH] BACKEND FIXES
  5.  
  6. ---
  7. packages/backend/.gitignore | 2 ++
  8. packages/backend/config/base/postgres.js | 4 ++--
  9. packages/backend/package.json | 9 ++++-----
  10. packages/backend/src/app/server/graphql/lib/addSchema.ts | 2 +-
  11. packages/backend/yarn.lock | 4 ----
  12. 5 files changed, 9 insertions(+), 12 deletions(-)
  13.  
  14. diff --git a/packages/backend/.gitignore b/packages/backend/.gitignore
  15. index 98e214d..034ee6a 100644
  16. --- a/packages/backend/.gitignore
  17. +++ b/packages/backend/.gitignore
  18. @@ -3,3 +3,5 @@ node_modules/
  19. runtime/
  20. src/infrastructure/migrations/
  21.  
  22. +.vscode
  23. +.idea
  24. diff --git a/packages/backend/config/base/postgres.js b/packages/backend/config/base/postgres.js
  25. index f69f3bb..bc88ae8 100644
  26. --- a/packages/backend/config/base/postgres.js
  27. +++ b/packages/backend/config/base/postgres.js
  28. @@ -7,8 +7,8 @@ module.exports = {
  29. type: "postgres",
  30. host: "127.0.0.1",
  31. database: "bank-pamiati-20",
  32. - username: "gorod",
  33. - password: "123qwe",
  34. + username: "postgres",
  35. + password: "postgres",
  36. entities: [entitiesDir],
  37. migrations: [migrationsDir],
  38. logging: ["error", "query"],
  39. diff --git a/packages/backend/package.json b/packages/backend/package.json
  40. index e1bfef6..d7c8424 100644
  41. --- a/packages/backend/package.json
  42. +++ b/packages/backend/package.json
  43. @@ -7,10 +7,10 @@
  44. "build": "./node_modules/.bin/tsc",
  45. "cli": "/opt/bank-pamiati-20-backend/current/bin/environment node ./dist/app/bin/cli.js",
  46. "lint": "./node_modules/.bin/tslint 'src/**/*.ts' --fix",
  47. - "migrate": "bin/environment typeorm migration:run",
  48. - "revert": "bin/environment typeorm migration:revert",
  49. - "migration:new": "bin/environment typeorm migration:generate -n migration -d 'src/infrastructure/migrations'",
  50. - "serve": "node ./dist/application/bin/app.js"
  51. + "migrate": "typeorm migration:run",
  52. + "revert": "typeorm migration:revert",
  53. + "migration:new": "typeorm migration:generate -n migration -d 'src/infrastructure/migrations'",
  54. + "serve": "nodemon --delay 2.5 ./dist/app/bin/main-server.js | pino-pretty"
  55. },
  56. "dependencies": {
  57. "@types/axios": "^0.14.0",
  58. @@ -34,7 +34,6 @@
  59. "bluebird": "^3.5.5",
  60. "body-parser": "^1.19.0",
  61. "commander": "^2.20.0",
  62. - "deployment": "git+ssh://git@github.com/c7s/deployment.git#release-20170605-AA-2769",
  63. "event-stream": "^4.0.1",
  64. "express": "^4.17.1",
  65. "express-session": "^1.16.2",
  66. diff --git a/packages/backend/src/app/server/graphql/lib/addSchema.ts b/packages/backend/src/app/server/graphql/lib/addSchema.ts
  67. index 7ea50ff..1f60013 100644
  68. --- a/packages/backend/src/app/server/graphql/lib/addSchema.ts
  69. +++ b/packages/backend/src/app/server/graphql/lib/addSchema.ts
  70. @@ -26,5 +26,5 @@ export const addSchema = (params: InputParams) => {
  71. userId: <string>req.headers[DEFAULT_USER_ID_NAME] || null,
  72. })
  73. });
  74. - apollo.applyMiddleware({ app, path, cors: false });
  75. + apollo.applyMiddleware({ app, path, cors: true });
  76. };
  77. diff --git a/packages/backend/yarn.lock b/packages/backend/yarn.lock
  78. index 2ab195d..582795b 100644
  79. --- a/packages/backend/yarn.lock
  80. +++ b/packages/backend/yarn.lock
  81. @@ -798,10 +798,6 @@ depd@~2.0.0:
  82. version "2.0.0"
  83. resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
  84.  
  85. -"deployment@git+ssh://git@github.com/c7s/deployment.git#release-20170605-AA-2769":
  86. - version "1.0.0"
  87. - resolved "git+ssh://git@github.com/c7s/deployment.git#04a3d55385751fb9c1254cd217c046b6cc6db3f5"
  88. -
  89. deprecated-decorator@^0.1.6:
  90. version "0.1.6"
  91. resolved "https://registry.yarnpkg.com/deprecated-decorator/-/deprecated-decorator-0.1.6.tgz#00966317b7a12fe92f3cc831f7583af329b86c37"
  92. --
  93. 2.21.0.windows.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement