Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3e05eae

Browse files
remove winston
1 parent d015a3b commit 3e05eae

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

‎functions/aws-serverless-express.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ import morgan from 'morgan'
55
import bodyParser from 'body-parser'
66
import compression from 'compression'
77
import customLogger from './utils/logger'
8-
import expressWinston from 'express-winston'
9-
import winston from 'winston'
108

119
const app = express()
1210
const router = express.Router()
1311

1412
router.use(compression())
1513

16-
// app.use(morgan(customLogger))
14+
app.use(morgan(customLogger))
1715

1816
router.get('/users', (req, res) => {
1917
res.json({
@@ -48,30 +46,12 @@ router.get('/hello/', function(req, res){
4846
res.send('hello world')
4947
})
5048

51-
app.use(expressWinston.logger({
52-
transports: [
53-
new winston.transports.Console({
54-
json: true,
55-
colorize: true
56-
})
57-
]
58-
}))
59-
6049
app.use('/.netlify/functions/aws-serverless-express/', router)
6150

6251
router.use(cors())
6352
router.use(bodyParser.json())
6453
router.use(bodyParser.urlencoded({ extended: true }))
6554

66-
app.use(expressWinston.errorLogger({
67-
transports: [
68-
new winston.transports.Console({
69-
json: true,
70-
colorize: true
71-
})
72-
]
73-
}));
74-
7555
const binaryMimeTypes = [
7656
'application/javascript',
7757
'application/json',

‎package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
"compression": "^1.7.2",
99
"cors": "^2.8.4",
1010
"express": "^4.16.3",
11-
"express-winston": "^2.5.1",
1211
"morgan": "^1.9.0",
1312
"react": "^16.4.0",
1413
"react-dom": "^16.4.0",
1514
"react-scripts": "1.1.4",
16-
"serverless-http": "^1.6.0",
17-
"winston": "^3.0.0"
15+
"serverless-http": "^1.6.0"
1816
},
1917
"scripts": {
2018
"start": "npm-run-all --parallel start:app start:server",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /