Init
parent
47cdfb9c01
commit
0701295c99
|
@ -0,0 +1,14 @@
|
||||||
|
const express = require('express');
|
||||||
|
const bodyParser = require('body-parser');
|
||||||
|
|
||||||
|
const app = express();
|
||||||
|
|
||||||
|
const port = 8000;
|
||||||
|
|
||||||
|
//require functions
|
||||||
|
|
||||||
|
//routes
|
||||||
|
|
||||||
|
app.listen(port, () => {
|
||||||
|
console.log('We are live on ' + port);
|
||||||
|
});
|
|
@ -0,0 +1,5 @@
|
||||||
|
const postsRoutes = require('./posts');
|
||||||
|
|
||||||
|
module.exports = function(app, db) {
|
||||||
|
postsRoutes(app);
|
||||||
|
};
|
|
@ -0,0 +1,6 @@
|
||||||
|
module.exports = function(app) {
|
||||||
|
app.get('/posts', (req, res) => {
|
||||||
|
// You'll create your note here.
|
||||||
|
res.send('Hello')
|
||||||
|
});
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"name": "interview-v2",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "## Exercice",
|
||||||
|
"main": "app.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/Sundowndev/interview-v2.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/Sundowndev/interview-v2/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/Sundowndev/interview-v2#readme",
|
||||||
|
"dependencies": {
|
||||||
|
"body-parser": "^1.18.3",
|
||||||
|
"express": "^4.16.3"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"nodemon": "^1.18.3"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue