Greetings, Moonbats and other denizens of the hoary old Interwebs! Harken yea to my tale of woe!
Urgh! I've been working with the Express, React and Node.js (ERN) stack for both back-end API and front-end client/consumer. I must say that, after several months, I'm not impressed with it by any means. The problem I have with using JavaScript to write code is that it often fails silently (with no warning or error messages) and makes bugs really hard to track down, let alone solve. This is also true of ERN, since these technologies are based on JavaScript.
As it stands, the back-end server is not mapping functions to routes at all, so I keep getting 404 (Page Not Found) errors when I try to access API endpoints (with and without parameters). I have no idea why (or where) the failure is happening, since there are no error messages in either the log file or console output for the back-end. I've put in console.log () statements at various points in server.js and they all execute, so the problem doesn't seem to be there, and yet it seems to silently ignore the route mapping code for some reason. I've tried excluding various app.use () mappings (all but one) to no avail. I've picked through the controller and routing code files and not found any bugs. I've even put the code through Claude AI and got back nothing useful in diagnosing or resolving the issue. I'm fresh out of ideas and can't get any work done until the issue's solved.
Of course, using AI to write code is all well and good when it works, but when it doesn't, it can be hard to debug (and take just as long as the time saved by using it in the first place). The problem I have with AI is that it's just like magic: It doesn't explain itself or its methodology unless explicitly told to. It can still fail spectacularly. It also has to be given precise instructions to get it to produce output that is sort of right (but still requires tweaking).
I guess I'll just have to go back to reading A Canticle for Liebowitz until somebody rescues me. Either that or look for alternative employment.