See instruction GHCJS.md
- This project is based on cabal 3.2.0.0, GHC 8.6.5 and GHCJS 8.6 versions.
- The project is comprised by two packages
frontendfor constructing javascript part andfrontend-htmlfor constructing html part. - For building both of them at once just run
build.shthat builds them and copy results toresultfolder.
- For building just the
frontend-htmlpart of the project use commands:
cabal run --project-file=frontend-html.project frontend-htmlThey generate html files to result/ folder.
- Building
frontendpart of the project for mainnet use commands:
cabal new-build --ghcjs frontendto build all webpages. Copy all.js files to the respective files in result/.
Alternatively, simply run
./build-frontend.shIt will compile frontend and copy required files to result/.
- Building frontend for preprod use flags
predaoandpreapp
cabal new-build -f preapp -f predao --ghcjs frontendor simply run
./build-frontend-dev.shIt will compile frontend in dev mode and copy required files to result/.
- Rebuild frontend in dev mode and run it with caddy at once
run-dev.shSwitch to cabal 3.2.0.0 and GHC 8.6.5 for HLS support (HLS version for the setup is 1.8.0.0).
Download caddy2.
Run the server locally caddy run.
Open http://localhost:3333/ or http://localhost:3333/app.html or http://localhost:3333/dao.html in the browser to see the results!