Need help configuring the ejs view engine with netlify
I attempted to set app.set('view engine', 'ejs')
, but didn't see any results.
const express = require('express');
const path = require('path');
const serverless = require('serverless-http');
const app = express();
const router = express.Router();
// app.set('view engine', 'ejs');
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use('/assets', express.static(path.join(__dirname, 'assets')));
router.get('/', (req, res) => {
res.render('home');
});
module.exports = app;
module.exports.handler = serverless(app);
No output is generated on the screen.