I’m trying to get started building an application using node.js but can’t seem to even get a test page to work…
I’ve connected to the database and created a test query which I’ve added to the page using server connect (as per usual). I’ve just added a basic select menu using this as the data source but when I check the page in a browser I get the following error in the console…
{"status":"500","message":"A server error occured, to see the error enable the DEBUG flag."}
I’ve enabled debug but just get the same error telling me to turn on debug.
I created another basic query and tried outputting that straight to a browser but just get the following…
{"status":"404","message":"/api/test not found."}
Turning on debug in the query properties makes no difference to this error.
Are these errors something to do with routing? I haven’t made any changes here but was under the impression the routing configuration “works out the box”…
Any help much appreciated - I really want to start using node.js but tempted to just go back to PHP.
Have you re deployed your site since changing the setting?
Once debug is enabled you must view the output in the Network section of the browser developers console to see there error.
The dialogue you posted are from the direct settings used only by the database manager. Have you checked the settings in the global s section of workflows?
Ah ha! I see what’s been happening. When I first set this up I made a typo in the password (in the database connection in globals). When you save the connection settings there’s no indication that the json file also needs saving…
Here’s an example - I change the password here and hit save…
I assumed the associated file was saved as there’s no blue indicator as there is for other files to show that it needs saving again. If I hit Ctrl+S it saves the file and now it works.
Maybe when you change connection settings under Globals and select Save it should save the file automatically without the need to save the file again…or at least show the little blue indicator to show the file needs saving.
Anyway, thanks for helping me find the issue…I thought it would probably be something simple!