From 805ab5db511cf9e98da0acd9b32c48cd2450c7ef Mon Sep 17 00:00:00 2001 From: Dave Schumaker Date: Wed, 25 Feb 2015 15:19:36 -0800 Subject: [PATCH 1/3] Replace express.logger() middleware --- app.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index e3a5e21..7b9845e 100644 --- a/app.js +++ b/app.js @@ -1,9 +1,10 @@ /* * Module dependencies */ -var express = require('express') - , stylus = require('stylus') - , nib = require('nib') +var express = require('express'), + logger = require('express-log'), + stylus = require('stylus'), + nib = require('nib') var app = express() @@ -16,7 +17,7 @@ function compile(str, path) { app.set('views', __dirname + '/views') app.set('view engine', 'jade') -app.use(express.logger('dev')) +app.use(logger()); app.use(stylus.middleware( { src: __dirname + '/public' , compile: compile @@ -30,4 +31,4 @@ app.get('/', function (req, res) { ) }) -app.listen(3000) \ No newline at end of file +app.listen(3000) From 27908b5742961afb6bd2303275982a74312426d6 Mon Sep 17 00:00:00 2001 From: Dave Schumaker Date: Wed, 25 Feb 2015 15:19:49 -0800 Subject: [PATCH 2/3] Update app.js --- app.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app.js b/app.js index 7b9845e..d209f17 100644 --- a/app.js +++ b/app.js @@ -6,7 +6,6 @@ var express = require('express'), stylus = require('stylus'), nib = require('nib') - var app = express() function compile(str, path) { From 0ff5afe6b3e8d25b5c788a42989c9035c250a099 Mon Sep 17 00:00:00 2001 From: Dave Schumaker Date: Wed, 25 Feb 2015 15:23:07 -0800 Subject: [PATCH 3/3] Add express-log --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 0217293..6cd4eca 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "app.js", "dependencies": { "express": "3.0.0alpha4", + "express-log": "^1.0.1", "nib": "^1.0.4", "stylus": "^0.49.1", "jade": "^1.7.0"