mirror of
https://github.com/jasny/bootstrap.git
synced 2026-01-21 04:17:53 -05:00
Fix GET data for js test server
This commit is contained in:
@@ -4,13 +4,14 @@
|
||||
*/
|
||||
|
||||
var connect = require('connect')
|
||||
, url = require('url')
|
||||
, querystring = require('querystring')
|
||||
, http = require('http')
|
||||
, fs = require('fs')
|
||||
, app = connect()
|
||||
.use(connect.static(__dirname + '/../../'))
|
||||
.use(function(req, res, next) {
|
||||
if (req._parsedUrl.pathname == '/data') res.end(querystring.parse(req._parsedUrl.query).items)
|
||||
if (url.parse(req.url).pathname == '/data') res.end(querystring.parse(url.parse(req.url).query).items)
|
||||
else next()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user