I'm trying to create a server for my HTML application, but when I go to localhost:8080/map I get Error: Cannot find module 'HTML'. Still, the main at localhost:8080 page works fine.
My code :
const path = require('path');
const port = 8080;
const express = require('express');
const app = express();
app.use(express.static(path.join(__dirname, 'public')));
app.set("view engine", html);
app.get('/', (req, res) => {
res.render('index.html')
})
app.get('/map/', (req, res) => {
res.render('map.html')
})
var server = app.listen(8080, function () {
console.log(`App listening at http://localhost:${server.address().port}/`)
})