Reputation: 123
I am doing a PluralSight tutorial on Node.Js / Express, when I try to load up my admin router page it just loads forever , no error message or anything appears. It is set to run on localhost:4000 . The other router file I created seems to work fine.
Link to the Github here: https://github.com/maxm2017/C-Users-mmerc-OneDrive-Pluralsight-Building-Web-Applications-with-Node.js-and-Express/blob/main/src/routers/adminRouter.js
Any advice would be much appreciated. Thanks
Upvotes: 0
Views: 275
Reputation: 11
If there is an error in your try { } block, it should throw to the catch { } block, which has:
debug(error.stack);
This is should output an error to the node console but it never sends anything back to the client(browser).
Check the node console for errors to fix the problem. Also, add this under the debug line to tell the client that there has been an erorr:
res.status(500).send(error)
Upvotes: 1