-
-
Save crimelabs786/50f6114759b53388a05df6aa1b137700 to your computer and use it in GitHub Desktop.
node starter
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
const http = require("http"); | |
const port = process.env.PORT || 3000; | |
const server = http.createServer((req, res) => { | |
res.statusCode = 200; | |
const msg = 'Hello Node!\n' | |
res.end(msg); | |
}); | |
server.listen(port, () => { | |
console.log(`Server running on http://localhost:${port}/`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment