Browse Source

Add request count function to test server

Ben Hsieh 8 years ago
parent
commit
d4b11948ea
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      test-server/server.js

+ 2
- 1
test-server/server.js View File

40
     console.log('test server running at port ',8123)
40
     console.log('test server running at port ',8123)
41
 })
41
 })
42
 
42
 
43
+var count = 0
43
 
44
 
44
 app.use(function(req,res,next){
45
 app.use(function(req,res,next){
45
-  console.log(chalk.green('request url=') + chalk.magenta(req.url))
46
+  console.log(chalk.green('request url=') + chalk.magenta(req.url), ++count)
46
   next()
47
   next()
47
 })
48
 })
48
 
49