Skip to content Skip to sidebar Skip to footer

Problems With My Routes In My Production Project With Node Js Error

I am presenting problems with my project in production, I don't know if I have a bad configuration or something like that, I would like to know if you can see something, I will lea

Solution 1:

router.get ('/ articles /: last?', ArticleController.getArticles);

Try removing the spaces

Because in your router you have

 router.get('/articles/:last?', ArticleController.getArticles);

And that you are doing is

 router.get ('/ articles /: last?', ArticleController.getArticles);

And try removing, because I understan that you will pass any param there is it?

: last?

Solution 2:

I already knew what was happening, something very embarrassing haha, I did not take the routes, because my backend was not in line with netlify, only my frontend, so I proceeded to upload my backend project in heroku and only connected my Global variable for the routes, pointing to the link that indicated heroku :) and ready, solved, thank you all for your time.

Basically create a global variable in my frontend that will point to the link where my apis were and now it works :)

Post a Comment for "Problems With My Routes In My Production Project With Node Js Error"