backbone-boilerplates icon indicating copy to clipboard operation
backbone-boilerplates copied to clipboard

500 Error: Cannot find module 'undefined'

Open 42thcoder opened this issue 12 years ago • 1 comments

Thanks for your example. It really helps.

There is an issue here. When I try to run option1, there is an error "500 Error: Cannot find module 'undefined'".

After I repalce the code in app.js

app.get('/todo', function(req, res){
  res.render('todo', {title: "MongoDB Backed TODO App"});
});

with code like this

app.get('/todo', function(req, res){
    res.sendfile(__dirname + '/public/static.html');
});

It works just fine. Why? If it's an bug, would you fix it?

42thcoder avatar Oct 26 '12 15:10 42thcoder