I'm taking a Linkedin course on building a website using express.js I'm trying to get my index.ejs page to render, however the server keeps rendering my index.html page.
I've already checked other overflow articles but it just shows to switch params (req,res), put ("index"), and to combine the app.get statement.
Here is my server.js code
const { response } = require('express');
const express = require('express');
const path = require('path');
const app = express();
const port = 3000;
app.set('view engine', 'ejs');
app.set('views', path.join(__dirname, './views'));
app.use(express.static(path.join(__dirname, './static')));
app.get('/', (req, res) => {
response.render('index', { pageTitle: 'Welcome' });
});
app.get('/speakers', (req, res) => {
response.sendFile(path.join(__dirname, './static/speakers.html'));
});
app.listen(port, () => {
console.log(`Example app listening on port ${port}`);
});
If I remove my index.html file I get this error message