Skip to content

Instantly share code, notes, and snippets.

@marceloserpa
Created May 26, 2021 00:40
Show Gist options
  • Save marceloserpa/a18fb6e2daf80f2cdce973201571f00d to your computer and use it in GitHub Desktop.
Save marceloserpa/a18fb6e2daf80f2cdce973201571f00d to your computer and use it in GitHub Desktop.
curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
sudo yum install -y nodejs
const http = require('http');

const port = 3000;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World');
});

server.listen(port, () => {
  console.log(`Server running at http://localhost:${port}/`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment