# Deploy a Node.js app from GitHub

Source: https://resilis.io/guides/nodejs-deployment/

Deploy the public Node.js task board with Railpack. The sample stores tasks in memory, so a restart restores its three starter tasks. Use the PostgreSQL sample when task data must persist.

## Before you start

Create a fork of the sample repository, sign in to Resilis, and connect a GitHub account that can access your fork.

- [Open the Node.js task board repository](https://github.com/resilis/nodejs-task-board)
- [Open the shared read-only demo](https://app-riypzkp-01a1044b-dev.cx.resilis.net)

## Select the source and target

Start a new application and choose your fork of resilis/nodejs-task-board. Select the main branch. Set the app root to a single dot (.) and choose Development. The verified deployment used Resilis Cloud EU; select an available target in your account.

## Configure Railpack

Open Configure and select Advanced build and region settings. The repository has a Dockerfile, so select Railpack for this walkthrough. Leave the install and build commands empty. Set the start command to npm start.

### Start command

```sh
npm start
```

![Saved Node.js app build settings showing Railpack, blank install and build commands, and npm start.](/guides/media/nodejs-github/node-railpack-current.webp)

The captured app uses Railpack with the detected defaults.

## Set the app variables

Use Import to add the detected variable names. Import adds names only. Set PORT to 3000 and DEMO_READ_ONLY to false while you test your own editable deployment.

### Editable deployment

```sh
PORT=3000
DEMO_READ_ONLY=false
```

## Deploy and check the app

Select Deploy Application and wait for the deployment to show Running. Open the live URL and visit /ready. The endpoint reports ready with memory storage. Use the board to add a task and move it between To do, Doing, and Done.

### Readiness endpoint

```text
/ready
```

![The live task board shows Deploy my first app in the Doing column.](/guides/media/nodejs-github/node-live-board.webp)

The task was created and moved during the recorded deployment check.

![The restarted task board shows only its three starter tasks.](/guides/media/nodejs-github/node-after-restart.webp)

A restart clears tasks stored in memory.

[Node.js GitHub and Railpack walkthrough](/guides/media/nodejs-github/nodejs-github-walkthrough.mp4)

Poster: ![Poster for Node.js GitHub and Railpack walkthrough](/guides/media/nodejs-github/poster.webp)

[English captions](/guides/media/nodejs-github/nodejs-github-walkthrough.en.vtt)

[Transcript: plain-text transcript](/guides/media/nodejs-github/nodejs-github-walkthrough.transcript.txt)

## Understand restarts and read-only demos

The sample stores tasks in memory. Restarting or redeploying the app clears added tasks and restores the three starter tasks. Use the PostgreSQL sample when task data must persist.

For a shared demo, set DEMO_READ_ONLY to true after your edit checks. Turn off Redeploy current image before saving, then choose Save. Open Configuration, choose Build, and select Rebuild. Verify that GET /api/config reports read-only mode and that a write request returns HTTP 403. The shared demo is already read-only.
