Commit 3c79f34a authored by huanglu's avatar huanglu

feat: dev

parent a46009a5
......@@ -41,18 +41,6 @@ export default (appInfo: EggAppInfo) => {
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 = {
all(err: Error, ctx: Context) {
// 统一错误处理
......@@ -79,7 +67,6 @@ export default (appInfo: EggAppInfo) => {
jwt,
redis,
cors,
mongoose,
onerror,
security: {
csrf: {
......
......@@ -17,10 +17,6 @@ const plugin: EggPlugin = {
enable: true,
package: 'egg-cors',
},
mongoose: {
enable: true,
package: 'egg-mongoose',
},
jwt: {
enable: true,
package: 'egg-jwt',
......
......@@ -19,13 +19,13 @@
"ci": "npm run lint && npm run cov && npm run tsc",
"autod": "autod",
"lint": "eslint . --ext .ts",
"clean": "ets clean"
"clean": "ets clean",
"deploy": "docker build -f -t geek-socket-node"
},
"dependencies": {
"egg": "^2.6.1",
"egg-cors": "^2.2.3",
"egg-jwt": "^3.1.7",
"egg-mongoose": "^3.3.1",
"egg-redis": "^2.4.0",
"egg-scripts": "^2.6.0",
"egg-socket.io": "^4.1.6",
......
......@@ -18,6 +18,7 @@ import 'egg-view-nunjucks';
import 'egg-socket.io';
import 'egg-redis';
import 'egg-cors';
import 'egg-mongoose';
import 'egg-jwt';
import { EggPluginItem } from 'egg';
declare module 'egg' {
......@@ -38,6 +39,7 @@ declare module 'egg' {
io?: EggPluginItem;
redis?: EggPluginItem;
cors?: EggPluginItem;
mongoose?: 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