我在 ejs 中发现了错误。请告诉我哪里出了问题?

I found error in ejs. Please tell me where it goes wrong?

我不明白我的代码哪里出了问题。请帮我。每当我 运行 此代码(终端中的 nodemon app.js )时,我在浏览器中收到错误(错误:- 无法获取)。预先感谢您对我的帮助。

app.js code:- 

const express =require("express")
const bodyParser=require("body-parser");
const app=express();
app.set("view engine","ejs");

app.set("/",function (req,res) {
    var today=new Date();
    var day="";
    if(today.getDay()==6||today.getDay()==0)
    day="weekend";
    else
    day="weekday";
    res.render("todo", { kindofDay: day});
});

app.listen(3000,function() {
    console.log('server is starting...');

});

todo.ejs code:-

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Ejs day list</title>
</head>
<body>
    <h1>It's a <%= kindofDay %> !</h1>
</body>
</html>

你必须使用app.get

app.get("/",function (req,res) {
    var today=new Date();
    var day="";
    if(today.getDay()==6||today.getDay()==0)
    day="weekend";
    else
    day="weekday";
    res.render("todo", { kindofDay: day});
});