Skip to content

Instantly share code, notes, and snippets.

@sidwarkd
Last active December 11, 2016 19:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidwarkd/07470ed82c6ce9d18159012135c2e979 to your computer and use it in GitHub Desktop.
Save sidwarkd/07470ed82c6ce9d18159012135c2e979 to your computer and use it in GitHub Desktop.
Simple Node Server For Onion Omega
const http = require('http');
const hostname = '0.0.0.0';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello from the Onion Omega\n');
});
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