mariadumas Posted October 8 Posted October 8 (edited) Hi. I'm new at deploying Node apps. I've followed the wiki tutorial (https://wiki.helionet.org/tutorials/node.js) and I got the "Node.js is working" message. But I would like to know what my app.js file should include to see my site. Sorry if this is a silly question. The app is http://memoriasfilo.helioho.st/ and I'm using Express. Thanks, María Edited October 8 by mariadumas
KazVee Posted October 9 Posted October 9 There's no such thing as a silly question, no one was born knowing how to code. 🙂 Since you got the 'Node.js is working' message, this means your Node app is running. As you are using Express, the how-to guide we have specifically for Express might also be helpful for you: https://wiki.helionet.org/tutorials/node.js/express.js The app.js file the Express guide walks you through building is the backend of the site. To actually see your site, you would want to make HTML files (also maybe CSS and JavaScript too) for the frontend side. Then to connect the frontend to the backend, the official Express docs (https://expressjs.com/en/starter/static-files.html) recommend 'app.use' to serve up static files that you put into a folder named 'public', for example. If you still get stuck, googling for terms like "node express serve static files" brings up some how-to docs and YouTube videos that explain in a bit more detail how to connect it all together. Since Node apps are a major cause of people's accounts getting suspended for high server load, make sure you keep an eye on your account load here: https://heliohost.org/dashboard/load/ to make sure it doesn't go over the limits.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now