Skip to content

Commit

Permalink
function exported
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur committed Jan 9, 2021
1 parent 31048fb commit e33f59a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/surveyController.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,5 @@ router.get('/getSurvey:surveyId', (req,res) => {
res.json(response);
}
});
});
});
module.exports = router;
19 changes: 19 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require('./models/db');
var cors = require('cors')
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser')

const userController = require('./controllers/userController');
const surveyController = require('./controllers/surveyController');
const responseController = require('./controllers/responseController');
var app = express();
app.use(bodyParser.json())
app.listen(3000, () => {
console.log('Express server started at port: 3000');
});
app.use(cors());
app.use('/user', userController);
app.use('/survey', surveyController);
app.use('/response', responseController);

0 comments on commit e33f59a

Please sign in to comment.