Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
5,153 changes: 5,108 additions & 45 deletions package-lock.json

Large diffs are not rendered by default.

37 changes: 20 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"name": "parse-it",
"version": "1.0.0",
"description": "A natural language string parser",
"main": "server/app.js",
"scripts": {
"start": "node server/app.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": "8.12.0"
},
"author": "WW, Int'l",
"license": "ISC",
"dependencies": {
"express": "^4.16.4",
"moment": "^2.22.2"
}
"name": "parse-it",
"version": "1.0.0",
"description": "A natural language string parser",
"main": "server/app.js",
"scripts": {
"start": "node server/app.js",
"test": "jest"
},
"engines": {
"node": "8.12.0"
},
"author": "WW, Int'l",
"license": "ISC",
"dependencies": {
"axios": "^0.19.0",
"express": "^4.16.4",
"jest": "^24.8.0",
"moment": "^2.22.2",
"nodemon": "^1.19.1"
}
}
Binary file modified server/.DS_Store
Binary file not shown.
19 changes: 18 additions & 1 deletion server/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
const express = require('express');

const app = express();

//TODO: Add an express router
const router = express.Router();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


// Setup middleware so we can read the requests body
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use('/', router); // so router can work

// defining routes for the router
app.use('/MealTimes', require('./routes/MealTimes/MealTimesRoutes'));
app.use('/Dates', require('./routes/Dates/DatesRoutes'));
app.use('/StopWords', require('./routes/StopWord/StopWordRoutes'));
app.use('/Query', require('./routes/Query'));

// Set up port and have app listen
const PORT = ('port', process.env.PORT || 3000);
app.listen(PORT, () => {
console.log(`Listening on port ${PORT}`);
});
Loading