Skip to content

Instantly share code, notes, and snippets.

@jhonylucas74
Created September 4, 2017 11:32
Show Gist options
  • Save jhonylucas74/3874efba74b141c79f1fb0773550dca4 to your computer and use it in GitHub Desktop.
Save jhonylucas74/3874efba74b141c79f1fb0773550dca4 to your computer and use it in GitHub Desktop.
/*
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