Last active
August 24, 2019 15:48
-
-
Save flpms/ffd0135e1db0f6c70d52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const callback = function(request, response) { | |
response.writeHead(200, {'Content-Type': 'text/plain'}); | |
response.write('Recebido com sucesso'); | |
response.end(); | |
}; | |
http.createServer(callbackFunction).listen(1337,'127.0.0.1'); | |
//Foi incluido um console.log aqui para saber qual porta e endereço você pode usar | |
console.log('Server executando no endereço 127.0.0.1:1337 \n Só testar esse endereço no seu navegador http://127.0.0.1:1337'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment