新人刚入nodejs半个月,想跟着社区的学习项目学node,但才刚开始做就出bug o(╥﹏╥)o,希望社区里的大神能解答一下 这个是index.js 代码
app.locals.blog = {
title: pkg.name,
description: pkg.description
}
app.use(function (req, res, next) {
res.locals.user = req.session.user
res.locals.success = req.flash('success').toString()
res.locals.error = req.flash('error').toString()
next()
})
这个是header.ejs 的代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title><%= blog.title %></title>
<link rel="stylesheet" href="//cdn.bootcss.com/semantic-ui/2.1.8/semantic.min.css">
<link rel="stylesheet" href="/css/style.css">
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdn.bootcss.com/semantic-ui/2.1.8/semantic.min.js"></script>
</head>
<body>
明明是照着项目上面敲为什么还是报这个错
希望能解答一下