Jump to content

New users: wapps. Not sure of asking for help protocol. Forum issue #64677. Database connection not working


Recommended Posts

Posted

Just started Helio.  Not sure of how to get help.  Last week sent email and posted to Forum, without any response.  Trying this last avenue of help, a ticket. Please exuse me if this is out of order.... please let me known.   Here is the issue:  

I have a web project in development. It connects to a hosted database and a hosted email. At home I use WAMP (for email using phpMailer) and VS Code Terminal node server.js (for database connection using node.js) for testing. At home the project works: connects to the database and sends email. I opened a HelioHost, Johnny server account to test the project online, because Helio supports node.js, and is free. In my first attempt I got the connection to the database to work, but not the email. I reset the account to try to start again. Now the email works but not the database connection. When I open the website, https://wapps.helioho.st, using Chrome incognito browser, and try to I get the following errors: displayed on the page: Unexpected token '<', "<!DOCTYPE "... is not valid JSON; console: Failed to load resource: the server responded with a status of 404 (Not Found) users/login:1. I am not getting any log error messages. The node version I am using at home is 18.20.5 and on Helio 18.20.8.  The only changes I knowingly made between the first attempt and the reset was code affecting the email function (which is working now after the reset). I do have an .env file in the root directory, which I find is needed to make the email function work.  I eliminated it to try the database connection and got the same errors. I have double, tripled and quadruple checked the environmental variables I inputted into the Plesk Node.js page.  

“I work a lot with Grok AI to resolve issues.  This has us both stumped. I gave Grok the code for the following files:  login.html, server.js and .env (to verify the environmental variables). Grok’s responses: 
404 Not Found for /users/login: On HelioHost, a 404 error can also occur if the Node.js application hasn't been properly deployed, if the Apache server isn't routing requests to your Node.js app, or if there's an issue with the application setup in Plesk.
Unexpected token '<', "<!DOCTYPE "... is not valid JSON: This error occurs because the client expects a JSON response from /users/login, but the server is returning an HTML page (likely a Plesk 404 error page or a default page). This happens when the Node.js app isn't handling the request, and Apache/Plesk serves a fallback HTML page.
No Log Error Messages: The absence of log errors could mean that the Node.js app isn't even processing the request (e.g., Apache isn't forwarding requests to the app), or the logging middleware (morganMiddleware or logger) isn't capturing errors correctly.”

I wondering if my service on Helio is functioning.

PLEASE, ANY HELP WOULD BE MUCH APPRECIATED.  Otherwise I will try to reset and try again.

Posted

You have already asked this question twice, once by email and the second time here

Please do not create duplicate forum threads for the same issue. All helpers are unpaid volunteers who donate their time to assist others. Asking the same question in multiple posts can lead to wasted effort and slower support.

For guidance on where and how to ask for help, see: https://wiki.helionet.org/FAQ#Where_do_I_ask_for_help? 

To understand how Community-Powered Technical Support works, visit: https://wiki.helionet.org/FAQ#How_does_community-powered_support_work?

For support response timelines (SLAs and ETAs), check: https://wiki.helionet.org/ETA

Posting the same question multiple times may delay answers to your request.

Please check your original forum thread for updates: https://helionet.org/index/topic/64677-database-connection-not-working-first-time-using-the-forum/

  • KazVee locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...