Created
February 5, 2016 07:37
-
-
Save grimen/8163a5177e9e8603b1b6 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
local http = require('http') | |
http.createServer(function (req, res) | |
local body = "Hello world\n" | |
res:setHeader("Content-Type", "text/plain") | |
res:setHeader("Content-Length", #body) | |
res:finish(body) | |
end):listen(1337, '127.0.0.1') | |
print('Server running at http://127.0.0.1:1337/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment