const express = require("express") const app = express() const PORT = 3000 const path = require("path") app.get("/product_id/:id", function(req, res) { let id = req.params.id res.sendFile(path.join(__dirname, "/static/products/product" + id + ".html")) }) app.use(express.static('static')) app.listen(PORT, function() { console.log(PORT) })