-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31048fb
commit e33f59a
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,4 +91,5 @@ router.get('/getSurvey:surveyId', (req,res) => { | |
res.json(response); | ||
} | ||
}); | ||
}); | ||
}); | ||
module.exports = router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
|