박기홍

router edited

...@@ -4,6 +4,7 @@ const port = 3000; ...@@ -4,6 +4,7 @@ const port = 3000;
4 4
5 const mongoose = require('mongoose'); 5 const mongoose = require('mongoose');
6 const bodyParser = require('body-parser'); 6 const bodyParser = require('body-parser');
7 +const router = require('./router')(app);
7 8
8 app.use(bodyParser.urlencoded({extended:true})); 9 app.use(bodyParser.urlencoded({extended:true}));
9 app.use(bodyParser.json()); 10 app.use(bodyParser.json());
...@@ -15,6 +16,7 @@ db.once('open', function(){ ...@@ -15,6 +16,7 @@ db.once('open', function(){
15 console.log("Connected to mongod server"); 16 console.log("Connected to mongod server");
16 }); 17 });
17 18
19 +
18 mongoose.connect('mongodb://localhost/khusat'); 20 mongoose.connect('mongodb://localhost/khusat');
19 21
20 app.listen(port, () => { 22 app.listen(port, () => {
......
...@@ -69,4 +69,14 @@ module.exports = function(app) ...@@ -69,4 +69,14 @@ module.exports = function(app)
69 res.send(recommendedJob); 69 res.send(recommendedJob);
70 }); 70 });
71 71
72 + app.post('/addJobs', async(req, res, next) => {
73 + // 보직 추가하는 api
74 + });
75 +
76 + app.post('/addQuestions', async(req, res, next) => {
77 + // 질문 추가하는 api
78 + });
79 +
80 +
81 +
72 } 82 }
...\ No newline at end of file ...\ No newline at end of file
......