Skip to content

Commit 32765ad

Browse files
committed
docs: update backend readme to use proper ghc and cabal versions
1 parent a4ef51e commit 32765ad

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

govtool/backend/README.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ This is a backend application of GovTool project.
55
## Prerequisites
66

77
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:
8-
* `cardano-node`
9-
* `cardano-db-sync`
10-
* PostgreSQL database
8+
9+
- `cardano-node`
10+
- `cardano-db-sync`
11+
- PostgreSQL database
1112

1213
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.
1314

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

2627
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.
2728

28-
1. Get [Nix](https://nixos.org/download).
29+
1. Get [Nix](https://nixos.org/download).
30+
31+
2. Get [direnv](https://direnv.net/).
32+
33+
3. Set GHC version to 9.10.1:
34+
35+
```sh
36+
ghcup install ghc 9.10.1
37+
38+
ghcup set ghc 9.10.1
39+
```
40+
41+
4. Install cabal
2942

30-
2. Get [direnv](https://direnv.net/).
43+
```sh
44+
ghcup install cabal
45+
ghcup set cabal
46+
```
3147

32-
3. Enter `govtool/backend` directory:
48+
5. Enter `govtool/backend` directory:
3349

3450
```sh
3551
cd govtool/backend
3652
```
3753

38-
4. Allow direnv to setup your environment:
54+
6. Allow direnv to setup your environment:
3955

4056
```sh
4157
direnv allow
4258
```
4359

44-
5. Update cabal & build project
60+
7. Update cabal & build project
4561
```sh
4662
cabal update
4763
cabal build all
4864
```
49-
6. Create a config file. You can use `example-config.json` as a template.
65+
8. Create a config file. You can use `example-config.json` as a template.
5066

51-
7. Run project
52-
```sh
67+
9. Run project
68+
`sh
5369
cabal run vva-be -- --config <YOUR CONFIG FILE> start-app
54-
```
55-
> [!WARNING]
56-
> 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.
70+
`
71+
> [!WARNING]
72+
> 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.
5773

5874
## Development
5975

govtool/frontend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ yarn dev
114114

115115
#### Using Nix and Direnv
116116

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

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

0 commit comments

Comments
 (0)