Skip to content

Instantly share code, notes, and snippets.

@sloev
Created February 27, 2015 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sloev/e4d895698a34e4838748 to your computer and use it in GitHub Desktop.
Save sloev/e4d895698a34e4838748 to your computer and use it in GitHub Desktop.
-- a simple http server
srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
conn:on("receive",function(conn,payload)
print(payload)
conn:send("<h1> Hello, NodeMcu.</h1>")
end)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment