我已经审查了此问题,但无法解决问题 Nodejs/Express: Error: Failed to lookup view "error" in views directory
我有这些服务器设置
const express = require('express');
var jquery = require('jquery');
var admin = require("firebase");
var bodyParser = require('body-parser')
const app = express();
app.use(express.static(__dirname + '/public'));
app.set('view engine', 'ejs');
app.get('/login', function (req, res) {
res.render('login');
})
when I run the server this is the error I get
>>Error: Failed to lookup view "login" in views directory
what am I doing wrongly?