Skip to content

Instantly share code, notes, and snippets.

@luizpicolo
Created February 12, 2019 12:07
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 luizpicolo/72a6c9859b3a427f6b20b55cc048602a to your computer and use it in GitHub Desktop.
Save luizpicolo/72a6c9859b3a427f6b20b55cc048602a to your computer and use it in GitHub Desktop.
const http = require('http');
const port = 3000;
const ip = '10.10.1.96';
const server = http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<h1>Instituo Federal de Mato Grosso do Sul!</h1>')
})
server.listen(port, ip, function() {
console.log(`Servidor rodando em http://${ip}:${port}`);
console.log('Para parar o servidor: ctrl + c')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment