Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/retricsu/zero2ckb-server


https://github.com/retricsu/zero2ckb-server

Last synced: about 8 hours ago
JSON representation

Awesome Lists containing this project

README

        

# How To Run

api-server of the website [zero2ckb](https://zero2ckb.ckbapp.dev/)

require:

- `node 14`
- run a specific ckb devnet on your local environment:
- ckb version: `ckb_v0.38.1`
- genesis message: `zfRgxIjdaTftx6aW7n`
- [block assembler's args](https://github.com/RetricSu/zero2ckb-server/blob/develop/scripts/start-ckb.sh#L20-L35): `0x43d509d97f26007a285f39241cffcd411157196c`

you can take `scripts/start-ckb.sh` for ref.

create an .env file under root dir:

```sh
$ cat > ./.env <
CKB_RPC=
INDEXER_DB_PATH=
EOF
```

run:

```sh
yarn build
yarn serve
```

## prebuild images

the repo's [github packages](https://github.com/RetricSu/zero2ckb-server/pkgs/container/zero2ckb-server-prebuilds) will deploy prebuild image. the entire project is copy into `/zero2ck-server` folder in the image, with `node_module` pre-installed and typescript code pre-compiled.

the default lumos ckb indexer database is located in `/zero2ckb-server/indexed-db`, if you are try cleaning the devnet chain data, you should clean `indexed-db` folder as well.