Created
September 4, 2017 11:32
-
-
Save jhonylucas74/3874efba74b141c79f1fb0773550dca4 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
/* | |
Entre pelo terminal e digite: npm init | |
para criar um projeto node. Assim será possível instalar | |
módulos do npm. Para esse servidor funcionar basta instalar | |
o pacote express com o seguinte comando: npm install express --save | |
pronto.. crie o arquivo como código abaixo e execute o seguinte comando para | |
rodar o servidor: node server | |
*/ | |
var express = require('express') | |
var app = express() | |
app.use(express.static('public')) | |
app.listen(3000, function () { | |
console.log('Example app listening on port 3000!') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment