Skip to content

Commit

Permalink
Merge 7a225bf into 7003184
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilome committed Oct 14, 2018
2 parents 7003184 + 7a225bf commit 41337dc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -35,6 +35,7 @@
"babel-preset-stage-2": "^6.24.1",
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.3",
"cors": "^2.8.4",
"dotenv": "^6.0.0",
"express": "^4.16.3",
"jsonwebtoken": "^8.3.0",
Expand Down
4 changes: 4 additions & 0 deletions server/index.js
@@ -1,6 +1,7 @@
import express from 'express';
import bodyParser from 'body-parser';
import dotenv from 'dotenv';
import cors from 'cors';

import authRouter from './routes/authRouter';
import ordersRouter from './routes/ordersRouter';
Expand All @@ -9,6 +10,9 @@ import menuRouter from './routes/menuRouter';
dotenv.config();
const app = express();

// Enable CORS
app.use(cors());

app.get('/', (req, res) => {
res.status(200).json({
message: 'Welcome. API is live at /api/v1/',
Expand Down

0 comments on commit 41337dc

Please sign in to comment.