Created
May 30, 2017 17:30
-
-
Save fkchang/beef9e3462d27e66d174feb18bf40e4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nodejs' | |
http = node_require('http') | |
port = 1337 | |
http.JS.createServer(lambda { |req, res| | |
res.JS.writeHead(200, { 'Content-Type': 'text/plain' }.to_n) | |
res.JS.end("Hello World\n") | |
}).JS.listen(port) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment