# Node JS

### Step 1: Import and Activate repository

Click on import and activate repository button

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FPRjJMWxV1vHYXMjWBs34%2Fimage%20(2).png?alt=media&#x26;token=0f3fca54-1e8a-4e46-91d6-2ea1a16419c3" alt=""><figcaption></figcaption></figure>

Now connect your repositories or click on sync with Github.&#x20;

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2F0599JJfBU8kPKXZCNh9d%2Fimage%20(4).png?alt=media&#x26;token=e2ea493a-c907-4037-8c5f-7b4096e81438" alt=""><figcaption></figcaption></figure>

Configure Toystack application

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2F0CA8u5QYAyjWoOHvbCHT%2FScreenshot%202024-11-27%20at%205.11.38%E2%80%AFPM.png?alt=media&#x26;token=f19c37be-57fb-438a-93ee-cdb7933766c1" alt=""><figcaption></figcaption></figure>

### Step 2: Connect repository to Toystack

Connect all repositories or selected repositories you want to deploy on toystack

&#x20;

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FBWTMeZKk2rRrOmkKCz6O%2Fimage%20(6).png?alt=media&#x26;token=4f7b2921-3f23-43fb-85b4-2ef236fe5417" alt=""><figcaption></figcaption></figure>

You will be able to see all the connected repositories in the dashboard and click on them to proceed with the project configuration

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2F5Nu9Dj8YGbN7RSqKUoqb%2Fimage%20(11).png?alt=media&#x26;token=0b0354b6-ee5d-4f0d-bb9b-71038e59445c" alt=""><figcaption></figcaption></figure>

### Step 3: Configure project settings

* Choose Node as framework if you are using node, and if you are using Dockerfile in your project you can use docker as an option.&#x20;
* Provide build command, dependency installation command, root directory and give right port number.
* You can provide environmental variables if present or choose to save changes and proceed with next step.

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2F9brcoplRKoIAQ42fM1YV%2Fimage%20(8).png?alt=media&#x26;token=7baa077a-bbec-45f2-a4d4-919b6a8c045a" alt=""><figcaption></figcaption></figure>

## Step 4: Choose a plan

Choose a plan of your choice and activate it

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2Fi6AxZOCTmXGxRvbBn91g%2FBackend%20plan%20select.png?alt=media&#x26;token=8f59d21d-f559-4466-83eb-db5c5e104ae1" alt=""><figcaption></figcaption></figure>

After the successful payment, you will be able to see your plan details like this

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FRZkYNGbnvncapGpZqCIT%2Fimage%20(10).png?alt=media&#x26;token=9353e703-c138-4bd2-87ab-87c9e74456dc" alt=""><figcaption></figcaption></figure>

### Step 5: Setting up repository

You can setup your repository with the following options and you can see all the information related to your repository

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FuVAR3JgoP1gP2ODdFfCJ%2Fimage%20(12).png?alt=media&#x26;token=07ac400c-cbf9-4caf-a7c2-1af7e60fa996" alt=""><figcaption></figcaption></figure>

You can select the time you want your build to last from the settings

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FUiR6kRnl92ezzTBlpWtw%2Fimage%20(13).png?alt=media&#x26;token=02427be0-cff1-44a0-8e02-88c43a9fa00f" alt=""><figcaption></figcaption></figure>

### Step 6: Custom domains and environment variables

* You can also assign custom domain name to various branches in your repository.

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FGm8nYw3RFrhzeSLZinf2%2Fimage%20(14).png?alt=media&#x26;token=4f109d35-5519-4828-b5b3-2ad8510aab40" alt=""><figcaption></figcaption></figure>

You can either drag and drop the env file or manually enter it

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FVuK2pI410BDJ6924Mqpp%2Fimage%20(15).png?alt=media&#x26;token=73fca102-7d8d-43c2-a1d9-a3630e79210e" alt=""><figcaption></figcaption></figure>

### Step 7: Deploy

* Go to deployments and select deploy from branch.
* Choose branch and deployment validity and click on DEPLOY.

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2FC8dwtQabwaFEUW4wC0eb%2Fimage%20(18).png?alt=media&#x26;token=0947f5bd-a176-4140-9d02-506b190fbaf6" alt=""><figcaption></figcaption></figure>

### Step 8: View deployed application

* Once deployment is successful, click the URL generated.
* Access your node application through the URL.

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2F8hLDWwpWG7TOxsrBtdDn%2Fimage%20(16).png?alt=media&#x26;token=2c1d5874-27f5-499b-900f-b95538e0a5cb" alt=""><figcaption></figcaption></figure>

* you can monitor your build and application logs along with the analytics.

<figure><img src="https://3980355268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg3kWmYTC5OSJ5vltL8xU%2Fuploads%2Ff6qGVop7p1Otcs5APqWf%2Fimage%20(17).png?alt=media&#x26;token=9c76dc57-5223-45fc-9bed-56a9209fceb9" alt=""><figcaption></figcaption></figure>
