Skip to content

Commit

Permalink
logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur committed May 31, 2021
1 parent 60a51d1 commit d2c7e9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var cors = require('cors')
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser')

var logger = require('./logger').createLogger('./log/development.log');
const userController = require('./controllers/userController');
const surveyController = require('./controllers/surveyController');
const responseController = require('./controllers/responseController');
Expand All @@ -14,6 +14,7 @@ app.listen(port, () => {
console.log('Express server started at port: 3000');
});
app.use(cors());
logger.info('loading an array', [1,2,3], 'now!');
// app.use( function(req, res, next) {
// res.header('Access-Control-Allow-Origin', '*');
// res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');
Expand Down
7 changes: 6 additions & 1 deletion 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"express": "^4.17.1",
"logger": "0.0.1",
"mongoose": "^5.7.4"
}
}

1 comment on commit d2c7e9f

@vercel
Copy link

@vercel vercel bot commented on d2c7e9f May 31, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.