Skip to content

Instantly share code, notes, and snippets.

@goeroeku
Created October 24, 2020 07:15
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 goeroeku/d13568c3316237b580cf085fe3c00b32 to your computer and use it in GitHub Desktop.
Save goeroeku/d13568c3316237b580cf085fe3c00b32 to your computer and use it in GitHub Desktop.
Panduan menggunakan NodeJS pada Private Cloud IDCH
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 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