Skip to content

Instantly share code, notes, and snippets.

@dylancwood

dylancwood/testserver.js

Last active Aug 29, 2015
Embed
What would you like to do?
Quick server to test whether http module automatically decodes url
var http = require('http');
var server = http.createServer();
server.on('request', function(req, res) {
console.log(req.url);
res.end();
});
server.listen(8123);
/**
* run this script with `node testserver.js`
* navigate to localhost:8123/foo/b+ar/sp ace
* check console output
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.