Jump to content

Recommended Posts

Posted

Hi. I've long dreamed of using Wasm server-side, so I was very excited when Node.js was announced for Tommy! Thank you. I'm still a little new to Node.js, though.

I downloaded Node.js version 10.16.3 to be compatible with Heliohost, wrote an app in JavaScript and Wasm, and got it working on localhost on my Windows 10 computer.

To finally upload it, I sort of followed the instructions at https://wiki.helionet.org/Node.js but I must have done this part all wrong because because it's been about 21 hours since I uploaded it, and I still see the 404 error when I try to visit the page.

Here are the things I'm concerned I may have done wrong, but I'm not sure which is the most important thing to change, if any:

  • My main JavaScript file is not called “app.js” as in the instructions, because I had called it something else when I first began the project.
  • I didn't enter “Node” in the “Name” field as the instructions said to, but rather used the name that I used when I first initialized the app with “npm init”.
  • I didn't enter “node” in the “Application URL” field as the instructions said to, but rather name of my app, because I'd like people to be able to use the <domain_name>/<app_name> to open the app.
  • I didn't enter “node” in the “Path” field, because I'd like to add another app to my site later, and I hadn't written my first app to be 2 apps from the beginning.
  • I uploaded all the files, including the “package.json” file, the “package-lock.json” file and the entire “node_modules” folder. Should I have rather just uploaded only the files I wrote and then used some npm tool in cPanel to install the dependencies?
    If I click “Ensure dependencies” in the Application Manager, it gives a green message saying, “Dependencies ensured...” and a ticked “Done”. Again, is this something I should have clicked before/instead of uploading all the package files?

About 2 hours ago, I uploaded an empty tmp/restart.txt file, but still the 404 error.

Which of the above things should I change, and which of them are fine? Is there anything else I may have done wrong?

Posted

My main JavaScript file is not called “app.js” as in the instructions, because I had called it something else when I first began the project.

It has to be named app.js. If you don't want to name it app.js you can instead make a symlink. So, for instance, if you want to call it index.js you would need to make a symlink named app.js that points to index.js.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...