Last active
March 20, 2018 11:04
-
-
Save ankur-anand/99c137a22e618fa90efaeb6d8f08da93 to your computer and use it in GitHub Desktop.
mini-expressjs gist
This file contains 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
listen(port, cb) { | |
const server = http.createServer((req, res) => { | |
res.statusCode = 200; | |
res.setHeader("Content-Type", "text/plain"); | |
res.end("Hello World\n"); | |
}); | |
return server.listen.apply(server, arguments); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment