Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Putta Khunchalee committed Jun 4, 2019
1 parent f3e871a commit 6eade19
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 6eade19

Please sign in to comment.