Open gustiti03 opened 4 weeks ago
Código NODEJS:
import express from 'express'; import path from 'path';
const app = express(); const port = 5000
app.use(express.urlencoded({ extended: true}))
app.get('/', function(req, res){ const root = path.resolve("./index.html") res.sendFile(root) })
app.post("/login", function(req, res ){ console.log(req.body) })
app.listen(port, function() { console.log("Estou online") })
Código NODEJS:
import express from 'express'; import path from 'path';
const app = express(); const port = 5000
app.use(express.urlencoded({ extended: true}))
app.get('/', function(req, res){ const root = path.resolve("./index.html") res.sendFile(root) })
app.post("/login", function(req, res ){ console.log(req.body) })
app.listen(port, function() { console.log("Estou online") })