Skip to content

Commit

Permalink
feat(rpc): adds README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
allemanfredi committed Oct 1, 2024
1 parent 16932b9 commit c6d296a
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions packages/rpc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Hashi RPC

A RPC server to expose hashi APIs.

## Getting Started

These instructions will cover the usage information and how to run the code locally for development using Docker.

### Configuration

Configure the mode you want to run by editing the variable in `.env` by checking `.env.example`

```sh
cp .env.example .env
```

### Install

Please make sure you have run `yarn install` on the root level.

```sh
cd ../.. # To the root level
nvm use
yarn install
cd packages/rpc
```

To start the RPC server, run the following command:

```sh
cd packages/rpc
yarn start:dev
```

### Building and Running the Docker Image

On the root's `docker-compose.yml`, run the following command:

```sh
cd ../.. # To the root level
docker compose up --build mongodb hashi_rpc
```

Make sure to set `PORT=3000` within `.env` file.

### Viewing Logs

To view the logs from the running container, use:

```sh
docker logs -f [CONTAINER_ID or CONTAINER_NAME]
```

You can find the `CONTAINER_ID` or `CONTAINER_NAME` using `docker ps`.

### Stopping the rpc

To stop the running container:

```sh
docker stop [CONTAINER_ID or CONTAINER_NAME]
```

0 comments on commit c6d296a

Please sign in to comment.