具体是这样的,在router里面代码大概是这样:
a = (req, res, next)->
res.render "index"
module.exports = (app)->
app.get '/', a
然后运行的时候就遇到了这个错误: TypeError: string is not a function
但如果是
res.send('abc')
就没错,究竟哪里错了,求大神帮助,谢谢
回复 (3)
R
全局装一下npm install coffee-script -g
C
引用 robertlyc全局装一下npm install coffee script g
已经装了,我写
res.send 'abc'
也是没错的
C
我知道我哪里SB了,是在配置那里写错了
参与回复
登录后即可参与回复。登录