Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
kpachhai committed May 29, 2024
1 parent 85dbc85 commit 1714b14
Showing 1 changed file with 44 additions and 31 deletions.
75 changes: 44 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,41 @@

## Build & Run from Source

- Build
To build the binary from the source, use the following command:

```bash
./scripts/build.sh
```
```bash
./scripts/build.sh
```

- Run
Before running, copy the example environment file to .env and configure it with the correct values:

```bash
cp .env.example .env;
./build/nuklai-feed
```
```bash
cp .env.example .env;
```

Then, run the application:

- Database Operations
```bash
./build/nuklai-feed
```

You can use the scripts/db.sh script to interact with the SQLite database.
NOTE: Make sure to have the correct values for PostgreSQL in your .env file.

- Get All Feeds:
### Database Operations

```bash
./scripts/db.sh get-all-transactions
```
You can use the scripts/db.sh script to interact with the SQLite database.

- Get Feed by TxID:
- Get All Feeds:

```bash
./scripts/db.sh get-feed-by-txid <TxID>
```
```bash
./scripts/db.sh get-all-transactions
```

- Get Feed by TxID:

```bash
./scripts/db.sh get-feed-by-txid <TxID>
```

- Get Feeds by user:

Expand All @@ -39,20 +46,26 @@

## Build & Run with Docker

- Build
To build the Docker image, use the following command:

```bash
docker build -t nuklai-feed .
```
```bash
./scripts/build.sh docker
```

- Run
Start the Docker containers:

```bash
./scripts/run_docker.sh
```
```bash
./scripts/run_docker.sh start
```

- Stop the docker container
To stop the Docker containers:

```bash
docker container stop nuklai-feed
```
```bash
./scripts/run_docker.sh stop
```

To view the logs of the Docker container:

```bash
./scripts/run_docker.sh logs
```

0 comments on commit 1714b14

Please sign in to comment.