Commit 3c79f34a authored by huanglu's avatar huanglu

feat: dev

parent a46009a5
...@@ -41,18 +41,6 @@ export default (appInfo: EggAppInfo) => { ...@@ -41,18 +41,6 @@ export default (appInfo: EggAppInfo) => {
allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS', allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
}; };
const mongoose = {
client: {
url: 'mongodb://192.168.32.32/fastgeek',
options: {
user: 'root',
pass: '123456',
useUnifiedTopology: true,
useFindAndModify: false,
},
},
};
const onerror = { const onerror = {
all(err: Error, ctx: Context) { all(err: Error, ctx: Context) {
// 统一错误处理 // 统一错误处理
...@@ -79,7 +67,6 @@ export default (appInfo: EggAppInfo) => { ...@@ -79,7 +67,6 @@ export default (appInfo: EggAppInfo) => {
jwt, jwt,
redis, redis,
cors, cors,
mongoose,
onerror, onerror,
security: { security: {
csrf: { csrf: {
......
...@@ -17,10 +17,6 @@ const plugin: EggPlugin = { ...@@ -17,10 +17,6 @@ const plugin: EggPlugin = {
enable: true, enable: true,
package: 'egg-cors', package: 'egg-cors',
}, },
mongoose: {
enable: true,
package: 'egg-mongoose',
},
jwt: { jwt: {
enable: true, enable: true,
package: 'egg-jwt', package: 'egg-jwt',
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
"ci": "npm run lint && npm run cov && npm run tsc", "ci": "npm run lint && npm run cov && npm run tsc",
"autod": "autod", "autod": "autod",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"clean": "ets clean" "clean": "ets clean",
"deploy": "docker build -f -t geek-socket-node"
}, },
"dependencies": { "dependencies": {
"egg": "^2.6.1", "egg": "^2.6.1",
"egg-cors": "^2.2.3", "egg-cors": "^2.2.3",
"egg-jwt": "^3.1.7", "egg-jwt": "^3.1.7",
"egg-mongoose": "^3.3.1",
"egg-redis": "^2.4.0", "egg-redis": "^2.4.0",
"egg-scripts": "^2.6.0", "egg-scripts": "^2.6.0",
"egg-socket.io": "^4.1.6", "egg-socket.io": "^4.1.6",
......
...@@ -18,6 +18,7 @@ import 'egg-view-nunjucks'; ...@@ -18,6 +18,7 @@ import 'egg-view-nunjucks';
import 'egg-socket.io'; import 'egg-socket.io';
import 'egg-redis'; import 'egg-redis';
import 'egg-cors'; import 'egg-cors';
import 'egg-mongoose';
import 'egg-jwt'; import 'egg-jwt';
import { EggPluginItem } from 'egg'; import { EggPluginItem } from 'egg';
declare module 'egg' { declare module 'egg' {
...@@ -38,6 +39,7 @@ declare module 'egg' { ...@@ -38,6 +39,7 @@ declare module 'egg' {
io?: EggPluginItem; io?: EggPluginItem;
redis?: EggPluginItem; redis?: EggPluginItem;
cors?: EggPluginItem; cors?: EggPluginItem;
mongoose?: EggPluginItem;
jwt?: EggPluginItem; jwt?: EggPluginItem;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment