Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -5,6 +5,7 @@ const bodyparser = require('koa-bodyparser'); | ... | @@ -5,6 +5,7 @@ const bodyparser = require('koa-bodyparser'); |
5 | const Mongoose = require('mongoose'); | 5 | const Mongoose = require('mongoose'); |
6 | const api = require('./src/api'); | 6 | const api = require('./src/api'); |
7 | const updateMedicineInfo = require('./src/lib/UpdatingMedicineInfo'); | 7 | const updateMedicineInfo = require('./src/lib/UpdatingMedicineInfo'); |
8 | +const MqttServer = require('./src/util/MqttServer'); | ||
8 | 9 | ||
9 | require('dotenv').config(); | 10 | require('dotenv').config(); |
10 | const { SERVER_PORT, MONGO_URL } = process.env; | 11 | const { SERVER_PORT, MONGO_URL } = process.env; |
... | @@ -31,4 +32,5 @@ app.use(router.routes()).use(router.allowedMethods()); | ... | @@ -31,4 +32,5 @@ app.use(router.routes()).use(router.allowedMethods()); |
31 | 32 | ||
32 | app.listen(SERVER_PORT, () => { | 33 | app.listen(SERVER_PORT, () => { |
33 | console.log('\x1b[1;36mPORT : ', SERVER_PORT, 'is connected\x1b[0m'); | 34 | console.log('\x1b[1;36mPORT : ', SERVER_PORT, 'is connected\x1b[0m'); |
35 | + MqttServer.on(); | ||
34 | }) | 36 | }) |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment