-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
28 lines (21 loc) · 716 Bytes
/
server.js
File metadata and controls
28 lines (21 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// const http = require("http")
const port = process.env.PORT || 3000
// const rotas = {
// "/": "Curso de Node",
// "/sobre": "Info sobre o projeto",
// "/livros": "Entrei na pag de livros",
// "/autores": "Listagem de autores",
// "/editora": "Pag de editora"
// }
// const server = http.createServer((req, resp) => {
// resp.writeHead(200, { "Content-Type": "text/plain" });
// resp.end(rotas[req.url]);
// console.log(req.headers);
// })
// server.listen(port, () => {
// console.log(`Servidor escuntando em http://localhost:${port}`);
// })
import app from "./src/app.js"
app.listen(port, () => {
console.log(`Servidor escuntando em http://localhost:${port}`);
})