Skip to content

Instantly share code, notes, and snippets.

@crimelabs786
Created August 13, 2020 12:43
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 crimelabs786/50f6114759b53388a05df6aa1b137700 to your computer and use it in GitHub Desktop.
Save crimelabs786/50f6114759b53388a05df6aa1b137700 to your computer and use it in GitHub Desktop.
node starter
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