Skip to content

Commit

Permalink
docs(onboarding): touch up onboarding docs, update nvmrc (#7348)
Browse files Browse the repository at this point in the history
  • Loading branch information
liangyuanruo authored May 27, 2024
1 parent 905a13b commit 7a48724
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.12.1
v18.20.2
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,17 @@ Notable features include:

### Prerequisites

Install [docker and docker-compose](https://docs.docker.com/get-docker/).
Install [docker and docker-compose](https://docs.docker.com/get-docker/) and the [node version manager](https://github.com/nvm-sh/nvm).

### First Setup

First, make sure to install and use the node version used by the project:

```bash
nvm install
nvm use
```

To install the relevant npm packages (frontend, backend and virus-scanner), run the following in the root direcory:

```bash
Expand All @@ -87,24 +94,23 @@ If you are on Mac OS X, you may want to allow Docker to use more RAM (minimum of

### Running Locally

Run the following shell commands to build the Docker image from scratch. This will usually take 10 or so minutes. These commands runs the backend services specified under [docker-compose.yml](docker-compose.yml) and the React frontend on the native host.
First, build the frontend for local development:

```bash
npm run build:frontend
npm run dev
```

After the Docker image has finished building, the React application can be accessed at [localhost:3000](localhost:3000). The backend API server can be accessed at [localhost:5001](localhost:5001).

If there are no dependency changes in `package.json` or changes in the
`src/app/server.ts` file, you can run
Run the following shell commands to build the Docker image. The first time will usually take 10 or so minutes. These commands runs the backend services specified under [docker-compose.yml](docker-compose.yml) and the React frontend on the native host.

```bash
docker-compose up
npm run dev
```

which does **not** rebuild the Docker image from scratch. This command usually
only takes ~15 seconds to finish starting up the image.
After the Docker image has finished building, the following local applications can be accessed:

- React application can be accessed at [localhost:3000](localhost:3000)
- The backend API server can be accessed at [localhost:5001](localhost:5001)
- The development mail server can be accessed at [localhost:1080](localhost:1080)

### Adding dependencies

Expand Down

0 comments on commit 7a48724

Please sign in to comment.