Play Video

[Tutorial] How to build websites with A2 Shared Hosting part 2: Set up Node.js using cpanel

Article version: https://helloworldmaster.com/article/how-to-set-up-a-node-js-app-on-a2-hosting

Now that we’ve signed up for A2 hosting, lets create our first node.js web application

let’s create a node.js application using a to hosting cPanel interface first we want to scroll down to the software section where you will see setup nodejs app we’re going to want to click on that and you’ll notice that I already have an application setup but if you’re new to a2 hosting and are watching this video you probably don’t have any web applications up right now so let’s click on create application next what we want to do is adjust
our nodejs version to be the latest version if your own project requires an older version that’s available feel free to add that instead next we want to add an application route so pick a name you like and this is the location where your node.js project will be located in your file system I’m just going to name mine a to node.js you our application URL is the URL we need to go on to be directed to our node web application I’m going to name that a
to no js’ then I’m going to hit create now we should see on the top right a green notification telling us that our nodejs application has been created now let’s go to the URL of our web application in our web browser you great we have created our nodejs application but what if we wanted to change the text we get back to say something else now let’s go to our file manager and head over to the location of our nodejs application that we had entered
earlier and let’s right click that and click view on our app j/s great here’s our app j/s now what if I wanted to edit the files in our nodejs application let’s right click on our app j/s and click Edit and I’m going to change it works to welcome the victory flame you I’m going to click on setup nodejs app and click on the application URL of our project and we don’t see our changes so what I’m going to do is go back to the page containing our
list of nodejs web applications and to the right there are a set of actions that we can choose from and I’m going to click on the restart I con that will restart our nodejs web application and I’m going to Paige and there it is welcome to victory flame now having node running is great but most people that use node.js also use it with express so in the next video I’m going to show you how to add Express to your nodejs web application and a2
hosting thank you guys so much for watching and I’ll see you in the next video