Im using edge template engine in my application node.js and I getting back the error; TypeError: app.use() requires middleware function
this is my code the index.js
const path = require('path');
const express = require('express');
const expressEdge = require('express-edge');
const app = new express();
app.use(express.static('public'));
app.use(expressEdge);
app.set('views', __dirname + '/views');
app.get('/', (req, res) => {
res.render('index');
});
app.get('/about',(req,res)=>{
res.sendFile(path.resolve(__dirname,'pages/about.html'));
});
app.get('/post',(req,res)=>{
res.sendFile(path.resolve(__dirname,'pages/post.html'));
});
app.get('/contact',(req,res)=>{
res.sendFile(path.resolve(__dirname,'pages/contact.html'));
});
app.listen(4000,() =>{
console.log('App listening on port 4000')
});
This is how I set up the folder in my application enter image description here