# How to setup a node.js application

## Step 1 - Setup Node.js App

Head over to our panel (<https://hunati.com:2222>) and click on the icon below (Setup Node.js App)

<figure><img src="https://693394340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83naDS2WVB1Pw6B4eRhH%2Fuploads%2Fbv0PBD86Au4Zq68eLeNW%2FScreenshot%202023-09-20%20at%2021.54.19.png?alt=media&#x26;token=25273192-37e1-4d8a-ac56-5b2eff2993c4" alt=""><figcaption><p>Click on "Setup Node.js App"</p></figcaption></figure>

## Step 2 - Create an application

Click on "Create Application" and follow the steps below.

<figure><img src="https://693394340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83naDS2WVB1Pw6B4eRhH%2Fuploads%2FPy3ge9opvxFsJhye5Ujk%2FScreenshot%202023-09-20%20at%2021.56.07.png?alt=media&#x26;token=9a3e770c-5133-4770-bc54-fedb40f84085" alt=""><figcaption><p>Click on "Create Application"</p></figcaption></figure>

Now fill everything in, for the node.js version we recommend the latest version (**18.6.0**) and put the mode on "Production". For your application root, you take the path from domains to public\_html (like in the image). The application URL should be the domain you want to run the application on.

The last part is the startup file, this file usually is your "index.js" or "server.js" (**this is a required field**) but if you have a different name then put it there. **Also, apps cannot be run using a startup script**! If everything is filled in you click on "Create".

<figure><img src="https://693394340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83naDS2WVB1Pw6B4eRhH%2Fuploads%2Fotui7GrKI8chm1rtZM0f%2FScreenshot%202023-09-20%20at%2021.58.14.png?alt=media&#x26;token=54b10a77-fb4f-4f0b-bac2-be1df7b1827b" alt=""><figcaption><p>Fill everything in</p></figcaption></figure>

<figure><img src="https://693394340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83naDS2WVB1Pw6B4eRhH%2Fuploads%2FqlVZh5PSFl8GiDKVi9BK%2FScreenshot%202023-09-20%20at%2022.05.58.png?alt=media&#x26;token=16a65d19-a551-4e1c-be74-2d24de15ebb1" alt=""><figcaption><p>Click on "Create"</p></figcaption></figure>

## Step 3 - Run NPM

After you have created the application you need to stop it and install npm. When the installation is done you start the app again.

<figure><img src="https://693394340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83naDS2WVB1Pw6B4eRhH%2Fuploads%2Fh50PkQpOTTO7n9WSSXzK%2Fimage.png?alt=media&#x26;token=db02b81e-1100-44b3-a601-e2beace973d0" alt=""><figcaption><p>Click on "Run NPM Install"</p></figcaption></figure>

<figure><img src="https://693394340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83naDS2WVB1Pw6B4eRhH%2Fuploads%2F2xQ879WcAUk60k7CUo5F%2Fimage.png?alt=media&#x26;token=7ff65e7a-b8fc-40c9-b6d4-4e77f634c968" alt=""><figcaption><p>Start the App again</p></figcaption></figure>
