Skip to content

Instantly share code, notes, and snippets.

@jalasem
Created March 21, 2021 00:03
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 jalasem/403936c506e435a4edeb247dab64b6e9 to your computer and use it in GitHub Desktop.
Save jalasem/403936c506e435a4edeb247dab64b6e9 to your computer and use it in GitHub Desktop.

Simple NodeJS Application


const requestHandler = (req, res) => {
  res.end("<h1>Hello Villagers</h1>");
};

const server = http.createServer(requestHandler);

server.listen(9010, () => {
  console.log("server is running on port 9010");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment