CityHost.UA
Help and support

An example of starting a test project on Node.js

This article demonstrates an example of running a test project on Node.js. Before running it, make sure you have started the Node.js functionality as described in [main article]

For an example, we will run a simple calculator on Node.js, the code of which is placed on github — github.com/actionsdemos/calculator

1) So, the Node.js functionality is launched, open [WEB-SSH] and go to the directory of the desired site:

execute the command ? cd www/cityhost.ua — where instead of cityhost.ua, specify the domain of your website created on hosting:

2) While inside the directory of the desired site, execute git clone to download the code of the test project from github (necessarily with a dot at the end of the command):

run the command ? git clone https://github.com/actionsdemos/calculator .

3) Wait for the project to download and check that the project files have appeared in the site directory:

execute the command (double English L) ? ll

4) If the files are downloaded, install dependencies and modules that are necessary for the operation of a specific project:

run command ? npm install

5) At this step, the installation is complete, return to the site control panel and restart the Node.js functionality to apply all the changes made:

As a result, after going to the site, you should see a test site with a Node.js application in the form of a simple calculator: