From 4425fef4cc550a28898405914256bd17e3ecb7ef Mon Sep 17 00:00:00 2001 From: VolodymyrK Date: Fri, 6 Sep 2024 14:42:12 +0200 Subject: [PATCH] Adjust documentation for client/server setup --- README.md | 49 +++--------------------------------------------- client/README.md | 4 ++-- server/README.md | 36 ++++++++++++++++++++++++++++++++++- 3 files changed, 40 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 6d98c91..51bd8a5 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/client/README.md b/client/README.md index d6b9346..29fc840 100644 --- a/client/README.md +++ b/client/README.md @@ -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 ``` diff --git a/server/README.md b/server/README.md index c1f75d0..1475433 100644 --- a/server/README.md +++ b/server/README.md @@ -1 +1,35 @@ -# Lottery Demo dApp Server \ No newline at end of file +# 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 +```