mirror of https://github.com/pelias/api.git
Browse Source
middleware/access_log.js, package.json -Add middleware for printing out access logs. -Add necessary dependencies.pull/123/head
Severyn Kozak
10 years ago
3 changed files with 18 additions and 0 deletions
@ -0,0 +1,14 @@
|
||||
/** |
||||
* Print out access logs. |
||||
*/ |
||||
|
||||
'use strict'; |
||||
|
||||
var peliasConfig = require( 'pelias-config' ).generate().api; |
||||
var morgan = require( 'morgan' ); |
||||
|
||||
module.exports = peliasConfig.accessLog ? |
||||
morgan( peliasConfig.accessLog ) : |
||||
function noop(req, res, next){ |
||||
next(); |
||||
}; |
Loading…
Reference in new issue