1+ // Copyright 2015, Google, Inc.
2+ // Licensed under the Apache License, Version 2.0 (the "License");
3+ // you may not use this file except in compliance with the License.
4+ // You may obtain a copy of the License at
5+ //
6+ // http://www.apache.org/licenses/LICENSE-2.0
7+ //
8+ // Unless required by applicable law or agreed to in writing, software
9+ // distributed under the License is distributed on an "AS IS" BASIS,
10+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+ // See the License for the specific language governing permissions and
12+ // limitations under the License.
13+
14+ 'use strict' ;
15+
116var express = require ( 'express' ) ;
217var path = require ( 'path' ) ;
3- var favicon = require ( 'serve-favicon' ) ;
418var logger = require ( 'morgan' ) ;
519var cookieParser = require ( 'cookie-parser' ) ;
620var bodyParser = require ( 'body-parser' ) ;
@@ -14,8 +28,6 @@ var app = express();
1428app . set ( 'views' , path . join ( __dirname , 'views' ) ) ;
1529app . set ( 'view engine' , 'jade' ) ;
1630
17- // uncomment after placing your favicon in /public
18- //app.use(favicon(__dirname + '/public/favicon.ico'));
1931app . use ( logger ( 'dev' ) ) ;
2032app . use ( bodyParser . json ( ) ) ;
2133app . use ( bodyParser . urlencoded ( { extended : false } ) ) ;
@@ -37,7 +49,7 @@ app.use(function(req, res, next) {
3749// development error handler
3850// will print stacktrace
3951if ( app . get ( 'env' ) === 'development' ) {
40- app . use ( function ( err , req , res , next ) {
52+ app . use ( function ( err , req , res ) {
4153 res . status ( err . status || 500 ) ;
4254 res . render ( 'error' , {
4355 message : err . message ,
@@ -48,7 +60,7 @@ if (app.get('env') === 'development') {
4860
4961// production error handler
5062// no stacktraces leaked to user
51- app . use ( function ( err , req , res , next ) {
63+ app . use ( function ( err , req , res ) {
5264 res . status ( err . status || 500 ) ;
5365 res . render ( 'error' , {
5466 message : err . message ,
0 commit comments