Skip to content

Instantly share code, notes, and snippets.

@berdoezt

berdoezt/app.js Secret

Created July 19, 2023 16:21
Show Gist options
  • Save berdoezt/e51718982926f0caa3fcd8ed45111430 to your computer and use it in GitHub Desktop.
Save berdoezt/e51718982926f0caa3fcd8ed45111430 to your computer and use it in GitHub Desktop.
const http = require('http');
const hostname = '0.0.0.0';
const port = 3001;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment