generated from Arquisoft/wiq_0
-
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.
Merge branch 'develop-questions' into develop-investigate-wikidata
Fix conflict with index.js
- Loading branch information
Showing
7 changed files
with
710 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Imports (express syntax) | ||
const express = require('express'); | ||
const cors = require('cors'); | ||
// Routes: | ||
const questionRoutes = require('./routes/question'); | ||
|
||
// App definition and | ||
const app = express(); | ||
const port = 8010; | ||
|
||
// Middlewares added to the application | ||
app.use(cors()); | ||
app.use(express.json()); | ||
|
||
// Routes middlewares to be used | ||
app.use('/questions', questionRoutes); | ||
|
||
// Start the service | ||
const server = app.listen(port, () => { | ||
console.log(`Question Generation Service listening at http://localhost:${port}`); | ||
}); | ||
|
||
module.exports = server |
Oops, something went wrong.