From 6eade19f88613b6f98834d412da2f492765360c4 Mon Sep 17 00:00:00 2001 From: Putta Khunchalee Date: Tue, 4 Jun 2019 12:32:35 +0700 Subject: [PATCH] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 03fbb20..01056b5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Zcoin Tokens Manager +[![Total alerts](https://img.shields.io/lgtm/alerts/g/zcoinofficial/ztm.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/zcoinofficial/ztm/alerts/) [![Language grade: C#](https://img.shields.io/lgtm/grade/csharp/g/zcoinofficial/ztm.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/zcoinofficial/ztm/context:csharp) This is a service for provide rich API for manage tokens on Zcoin Exodus Protocol. @@ -28,6 +29,26 @@ You need to install [Docker Compose](https://docs.docker.com/compose/) first the docker-compose up -d ``` +## Create Database + +Enter database shell: + +```sh +docker exec -it -u postgres ztm-main-db sh +``` + +Create a new role to be the owner of database: + +```sh +createuser ztm +``` + +Then create a database: + +```sh +createdb -E UTF8 -l C -O ztm ztm +``` + ## Migrate Database Schemas Change directory to `src/Ztm.Data.Entity.Postgres` then run: @@ -36,6 +57,15 @@ Change directory to `src/Ztm.Data.Entity.Postgres` then run: ZTM_MAIN_DATABASE="Host=127.0.0.1;Database=ztm;Username=ztm" dotnet ef database update ``` +## Start Zcoin Daemon + +Grab latest stable Zcoin binary from [here](https://github.com/zcoinofficial/zcoin/releases), extract or install it, +then start Zcoin daemon: + +```sh +./zcoind -printtoconsole -rpcuser=zcoin -rpcpassword=zcoin +``` + ## Start Web API ```sh