박권수

refactor. db update -> db connection after db update

...@@ -13,14 +13,14 @@ const app = new Koa(); ...@@ -13,14 +13,14 @@ const app = new Koa();
13 const router = new Router(); 13 const router = new Router();
14 14
15 15
16 -updateMedicineInfo.updateMedicineInfo();
17 -
18 Mongoose.connect(MONGO_URL, { 16 Mongoose.connect(MONGO_URL, {
17 + useFindAndModify : false,
19 useNewUrlParser : true, 18 useNewUrlParser : true,
20 useUnifiedTopology: true, 19 useUnifiedTopology: true,
21 useCreateIndex : true 20 useCreateIndex : true
22 }).then(() => { 21 }).then(() => {
23 console.log('Mongo DB is connected : ', MONGO_URL); 22 console.log('Mongo DB is connected : ', MONGO_URL);
23 + updateMedicineInfo.updateMedicineInfo();
24 }).catch(e => { 24 }).catch(e => {
25 console.log(e, error); 25 console.log(e, error);
26 }) 26 })
......
This diff is collapsed. Click to expand it.
...@@ -15,5 +15,8 @@ ...@@ -15,5 +15,8 @@
15 "IoT" 15 "IoT"
16 ], 16 ],
17 "author": "박권수", 17 "author": "박권수",
18 - "license": "ISC" 18 + "license": "ISC",
19 + "dependencies": {
20 + "mqtt": "^4.2.6"
21 + }
19 } 22 }
......