Browse Source

update test-server API

Ben Hsieh 8 years ago
parent
commit
5d1a523be1
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      test-server/server.js

+ 12
- 0
test-server/server.js View File

42
   res.redirect('/public/github.png')
42
   res.redirect('/public/github.png')
43
 })
43
 })
44
 
44
 
45
+app.all('/params', function(req, res) {
46
+  console.log(req.url)
47
+    var resp =
48
+      {
49
+         time : req.query.time,
50
+         name : req.query.name,
51
+         lang : req.query.lang
52
+      }
53
+    console.log(resp)
54
+    res.send(resp)
55
+})
56
+
45
 // return an empty response
57
 // return an empty response
46
 app.all('/empty', function(req, res) {
58
 app.all('/empty', function(req, res) {
47
   res.send('')
59
   res.send('')