Skip to content

Commit

Permalink
docs: update todo-app example instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
thruflo committed Nov 26, 2024
1 parent e9a0da9 commit 191aa70
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions examples/todo-app/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
# Todo example

This is a classic TodoMVC example app, developed using ElectricSQL.

## Setup

1. Make sure you've installed all dependencies for the monorepo and built packages
This example is part of the [ElectricSQL monorepo](../..) and is designed to be built and run as part of the [pnpm workspace](https://pnpm.io/workspaces) defined in [`../../pnpm-workspace.yaml`](../../pnpm-workspace.yaml).

Navigate to the root directory of the monorepo, e.g.:

```shell
cd ../../
```

Install and build all of the workspace packages and examples:

```shell
pnpm install
pnpm run -r build
```

Navigate back to this directory:

From the root directory:
```shell
cd examples/todo-app
```

- `pnpm i`
- `pnpm run -r build`
Start the example backend services using [Docker Compose](https://docs.docker.com/compose/):

2. Start the docker containers
```shell
pnpm backend:up
```

`pnpm run backend:up`
> Note that this always stops and deletes the volumes mounted by any other example backend containers that are running or have been run before. This ensures that the example always starts with a clean database and clean disk.
3. Start the dev server
Now start the dev server:

`pnpm run dev`
```shell
pnpm dev
```

4. When done, tear down the backend containers so you can run other examples
When you're done, stop the backend services using:

`pnpm run backend:down`
```shell
pnpm backend:down
```

0 comments on commit 191aa70

Please sign in to comment.