I have come across a problem that is probably silly but comes from my little knowledge of express. I have created a project with express and I cannot make calls to the root, only to the routes. I am pretty sure the problem lies somewhere in app.use(...).
app.js
var index = require('./routes/index');
var something = require('./routes/something');
...
app.use('/', index);
app.use('/users', users);
//This returns not found
app.get('/log', function(req, res){
res.send("Test");
};
index.js
//Render index.ejs to localhost
...
//This works
idx.get(/log', function(req, res){
res.send("Test Index");
}
So what do I write into app.user('/', HERE) in order to make get/post calls work in app.js. I believe app.use(app.router) took care of that in 3.x version.