Skip to content

Commit

Permalink
Adjust documentation for client/server setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Volodymyr-Kuchinskyi committed Sep 6, 2024
1 parent be70937 commit 4425fef
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 49 deletions.
49 changes: 3 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,58 +52,15 @@ make run-demo

### Server side

Go to the server folder and process (`cd client`)
Go to the server folder and proceed according to the instructions (`cd client`)

1) Run database
```bash
docker compose -f infra/local/docker-compose.db.yaml --project-name lottery up -d mysql
```

2) Use required node version

```bash
nvm use
```

3) Setup local deps
```bash
make setup-local
```

3) Run database migration

```bash
make sync-db
```

4) Run API
```bash
npm run api:dev
```

5) Run Event Handler
```bash
npm run event-handler:dev
```
[Server side setup instructions](./server/README.md)

### Client side

Go to the client folder and proceed (`cd client`)

1) Copy local config
```bash
cp public/config.js.local public/config.js
```

2) Install deps
```bash
npm install
```

3) Start dev server
```bash
npm start
```
[Client side setup instructions](./client/README.md)

## About Casper

Expand Down
4 changes: 2 additions & 2 deletions client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Next, update the following configuration values:
The rest of the values should remain the same for the local development, unless you made corresponding changes in other places.

To install the dependencies, run:
```
```bash
npm install
```

## Build

To build the project for production, run:
```
```bash
npm run build
```

Expand Down
36 changes: 35 additions & 1 deletion server/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
# Lottery Demo dApp Server
# Lottery Demo dApp Server

## Local setup

1) Run infrastructure
```bash
make run-local-infra
```

2) Use required node version

```bash
nvm use
```

3) Setup local deps
```bash
make setup-local
```

3) Run database migration

```bash
make sync-db
```

4) Run API
```bash
npm run api:dev
```

5) Run Event Handler
```bash
npm run event-handler:dev
```

0 comments on commit 4425fef

Please sign in to comment.