Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update backend readme to use proper ghc and cabal versions #2328

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 30 additions & 14 deletions govtool/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ This is a backend application of GovTool project.
## Prerequisites

In order to run `backend` your host machine will need access to the `cardano-db-sync` postgres database. To have this database running locally you'll need:
* `cardano-node`
* `cardano-db-sync`
* PostgreSQL database

- `cardano-node`
- `cardano-db-sync`
- PostgreSQL database

You will need your `cardano-node` and `cardano-db-sync` to be compatible with Sancho testnet. Until these features will be merged to the master branch the new Sancho compatible versions are available as releases on [github](https://github.com/IntersectMBO/cardano-db-sync/releases). You will also need a correct `cardano-node` version. The release notes for `cardano-db-sync` usualy specify that.

Expand All @@ -25,35 +26,50 @@ You can utilize the [docker-compose.node+dbsync.yml](../../scripts/govtool/docke

Due to problems with openapi3 package it's hard to build this project with plain `ghc` and `cabal-install`. Until the prolem is solved we reccomend using `nix` - this problem is fixed when you build your project from inside of the nix shell.

1. Get [Nix](https://nixos.org/download).
1. Get [Nix](https://nixos.org/download).

2. Get [direnv](https://direnv.net/).

3. Set GHC version to 9.10.1:

```sh
ghcup install ghc 9.10.1

ghcup set ghc 9.10.1
```

4. Install cabal

2. Get [direnv](https://direnv.net/).
```sh
ghcup install cabal
ghcup set cabal
```

3. Enter `govtool/backend` directory:
5. Enter `govtool/backend` directory:

```sh
cd govtool/backend
```

4. Allow direnv to setup your environment:
6. Allow direnv to setup your environment:

```sh
direnv allow
```

5. Update cabal & build project
7. Update cabal & build project
```sh
cabal update
cabal build all
```
6. Create a config file. You can use `example-config.json` as a template.
8. Create a config file. You can use `example-config.json` as a template.

7. Run project
```sh
9. Run project
`sh
cabal run vva-be -- --config <YOUR CONFIG FILE> start-app
```
> [!WARNING]
> In the context of our ongoing project enhancements, it is assumed that the executable previously known as 'vva-be' should be now officially renamed to 'govtool-backend'. This change is necessary for aligning with the updated branding and functional scope of the application and it has to be implemented in the near future as a chore and refactoring ticket. Make sure that the documentation matches the actual name of the executable.
`
> [!WARNING]
> In the context of our ongoing project enhancements, it is assumed that the executable previously known as 'vva-be' should be now officially renamed to 'govtool-backend'. This change is necessary for aligning with the updated branding and functional scope of the application and it has to be implemented in the near future as a chore and refactoring ticket. Make sure that the documentation matches the actual name of the executable.

## Development

Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ yarn dev

#### Using Nix and Direnv

1. Get [Nix](https://nixos.org/download).
1. Get [Nix](https://nixos.org/download) (And/Or) Get [GHCUP](https://www.haskell.org/ghcup/).

2. Get [direnv](https://direnv.net/).

Expand Down
Loading