const express = require("express")
const app = express()
const PORT = 3000
app.get("/", function(req, res) {
html = '
Linki'
for(let i = 0; i < 100; i++) {
let random = Math.floor(Math.random() * 100)
html += `Produkt ${random}
`
}
html += ''
res.send(html)
})
app.get("/product/:id", function(req, res) {
let id = req.params.id
res.send("podstrona z danymi produktu o id = " + id)
})
app.listen(PORT, function() {
console.log(PORT)
})