File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " simplehttpserver" ,
3
3
"description" : " Simple HTTP Server for static files" ,
4
4
"author" : " Teemu Ikonen <teemu.ikonen@ıki.fi>" ,
5
- "version" : " 0.0.2 " ,
5
+ "version" : " 0.0.3 " ,
6
6
"bin" : " ./cli.js" ,
7
- "engine" : " node >= 0.8 .0" ,
7
+ "engine" : " node >= 0.10 .0" ,
8
8
"dependencies" : {
9
9
"send" : " >=0.1.0" ,
10
10
"express" : " >=3.0.0" ,
11
- "async" : " >= 0.2.6"
11
+ "async" : " >= 0.2.6" ,
12
+ "body-parser" : " >= 1.9.2" ,
13
+ "morgan" : " >= 1.4.1"
12
14
},
13
15
"license" : " MIT" ,
14
16
"repository" : {
Original file line number Diff line number Diff line change @@ -4,15 +4,17 @@ var express = require('express'),
4
4
fs = require ( 'fs' ) ,
5
5
util = require ( 'util' ) ,
6
6
async = require ( 'async' ) ,
7
- send = require ( 'send' ) ;
7
+ send = require ( 'send' ) ,
8
+ morgan = require ( 'morgan' ) ,
9
+ bodyparser = require ( 'body-parser' ) ;
8
10
9
11
var mainapp = express ( ) ;
10
12
11
13
// Bodyparser parses HTTP POST parameters and JSON payload
12
- mainapp . use ( express . bodyParser ( ) ) ;
14
+ mainapp . use ( bodyparser ) ;
13
15
14
16
// Logger for requests
15
- mainapp . use ( express . logger ( ) ) ;
17
+ mainapp . use ( morgan ) ;
16
18
17
19
// Serve either current or directory given as argument
18
20
var dir = process . argv [ 2 ] || process . cwd ( ) ;
You can’t perform that action at this time.
0 commit comments