Closed neumartin closed 4 years ago
Finally I do this:
.get('/login', async (req, res) => {
let content = await fs.readFileSync(process.cwd() + "/public/" + "login.html");
res.send(content);
})
Maybe is not the best solution, but works.
Hi!
Im using serve-static to serve static files with restana, but I need to specify the route and trim ".html" part. For example the url http://localhost:3000/login.html I need to convert into http://localhost:3000/login
How can I do it? Thanks!