1
I am beginner in Nodejs and I came across this problem when I was exporting a module: "Typeerror: Cannot read Property 'get' of Undefined". I did not understand why the error occurred since the code is identical to the teacher of the course, but still the error occurs. Currently the code is like this:
module.exports = function(app){
app.get('/noticias', (req, res)=>{
res.render('noticias/noticias')
})
}
When I do the require
of the module the server does not go up, giving this error that I commented. I hope you can help me, I thank you already :)
Where are you making the call from that route you are setting?
– Sorack