Hello World Master

Tutorials, articles and quizzes on Software Development

A2Hosting > Articles

How to set up a Node.js app on A2 Hosting

This article is associated with the following course
Intro to a2 hosting with Node.js

First, we want to set up make sure we’re in our CPanel interface, which should look like the following

Then, we want to scroll down to Software and select Setup Node.js App, This should take you to a panel that looks like the following

Lets hit the orange create application button on the top right corner, you should be sent to a set of options that look like the following

Lets set our Node.js version to be 12.9.0 and then add an application root and our application url. Note that this will be the url of the root of our application. This is important to note when we start looking at setting up Express.

Now hit the orange create button and you should see that your node application is ready and running

Now we can go to the application url and we will see the following hello world page show up

But what if wanted to make a change, first we’d need to go back to our CPanel interface, then we go to the file manager, whose icon looks like the following

Then search for the folder with the name we used for the Application Root column when we set up our application. It should contain the following files

We can go on app.js and update the message inside, I’m going to update the message to say “Welcome to Victoryflame!!!”

Then I’ll press the blue button to save my changes. I’ll want to go back into our CPanel interface and select Setup Node.js app again. This time, we want to select the restart application icon next to the project we just created

Now when we go back to our application url, we should see our updated message