I was going through the express.static middleware in the curriculum, but it doesn’t seem to work even though my code is correct
##Code
let express = require('express');
let app = express();
const path = require('path')
app.get('/',(req,res)=>{
res.sendFile("/views/index.html",{root:__dirname})
console.log("loool")
})
app.use('/public', express.static(path.join(__dirname, 'public')))
module.exports = app;
Can somebody help?