mirror of
https://github.com/typicode/json-server.git
synced 2025-07-29 13:14:12 +08:00
Fix code style
This commit is contained in:
@ -8,14 +8,14 @@ var arr = []
|
||||
|
||||
// Logger
|
||||
arr.push(logger('dev', {
|
||||
skip: function(req, res) { return req.path === '/favicon.ico' }
|
||||
skip: function (req, res) { return req.path === '/favicon.ico' }
|
||||
}))
|
||||
|
||||
// Serve static files
|
||||
if (fs.existsSync(process.cwd() + '/public')) {
|
||||
arr.push(express.static(process.cwd() + '/public'));
|
||||
arr.push(express.static(process.cwd() + '/public'))
|
||||
} else {
|
||||
arr.push(express.static(__dirname + '/public'));
|
||||
arr.push(express.static(__dirname + '/public'))
|
||||
}
|
||||
|
||||
// CORS
|
||||
@ -26,4 +26,4 @@ if (process.env.NODE_ENV === 'development') {
|
||||
arr.push(errorhandler())
|
||||
}
|
||||
|
||||
module.exports = arr
|
||||
module.exports = arr
|
||||
|
Reference in New Issue
Block a user