Skip to content

Instantly share code, notes, and snippets.

@grimrose
Created April 28, 2014 09:38
Show Gist options
  • Save grimrose/11366844 to your computer and use it in GitHub Desktop.
Save grimrose/11366844 to your computer and use it in GitHub Desktop.
Nodyn on web server
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
var vertx = require('vertx');
vertx.createHttpServer().requestHandler(function(req) {
req.response.headers['Content-Type'] = "text/plain";
req.response.statusCode(200).end("Hello World");
}).listen(8080, 'localhost');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment