【发布时间】:2021-09-03 00:09:09
【问题描述】:
我是初学者 Dev。我正在使用 ejs 开发代码,但是在编辑“sn-p”中的段落时出现错误。我打破了段落不要太长,但这样做时出错了。
请有人帮助我!
app.set('view engine','ejs')
app.get('/', (req,res)=>{
const blogs =[
{
title: 'Thomas Sankara (Burkina Faso)',
snippet: 'Earlier this month a court in Burkina Faso's capital
indicted former President Blaise Compaoré for his role
in the murder of his comrade, Thomas Sankara on 15 October 1987.',
author: 'Jocelyne Botshimbo M pusa',
createdAt: Date.now(),
}
]
res.render('index',{blogs: blogs})
})
【问题讨论】:
标签: javascript node.js ejs