Skip to content

Commit

Permalink
Merge pull request #2 from obsidiansystems/is-dapp-polish-phase1b
Browse files Browse the repository at this point in the history
build and run pab without ob thunk
  • Loading branch information
luigy authored Jun 29, 2021
2 parents 0c9ef9e + 804da6d commit 1b301b2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions use-case-2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ db
ghcid-output.txt
static.out
.obelisk/impl/.attr-cache
result
4 changes: 1 addition & 3 deletions use-case-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ By the end of this README you will be able to run the POKE-DEX on your machine l

## Running Plutus Application Backend (PAB)

1. [Unpack plutus-starter GitHub Thunk]
1. After installing Obelisk, use `./scripts/run-pab.sh`
1. Followed by `main` when prompted to lauch the PAB and have it listen on port 8080
1. [Run PAB] After installing Obelisk, use `./scripts/run-pab.sh` to launch the PAB and have it listen on port 8080

## Starting Obelisk Frontend

Expand Down
1 change: 1 addition & 0 deletions use-case-2/backend/backend.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ library
, rhyolite-backend
, rhyolite-backend-db
, rhyolite-backend-notification-postgres
, text
, obelisk-backend
, obelisk-route
, vector
Expand Down
4 changes: 3 additions & 1 deletion use-case-2/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ p = project ./. ({ pkgs, ... }: {
ios.bundleIdentifier = "systems.obsidian.obelisk.examples.minimal";
ios.bundleName = "Obelisk Minimal Example";
});
in builtins.removeAttrs p ["ios" "android"]
in builtins.removeAttrs p ["ios" "android"] // {
plutus-starter = import deps.plutus-starter {};
}
5 changes: 5 additions & 0 deletions use-case-2/frontend/frontend.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@ build-type: Simple
library
hs-source-dirs: src
build-depends: base
, aeson
, aeson-gadt-th
, common
, containers
, groom
, obelisk-frontend
, obelisk-route
, jsaddle
, reflex-dom
, lens
, lens-aeson
, obelisk-executable-config-lookup
, obelisk-generated-static
, rhyolite-frontend
, safe
, scientific
, text
, unordered-containers
, vector
, vessel
exposed-modules:
Frontend
Expand Down
8 changes: 5 additions & 3 deletions use-case-2/scripts/run-pab.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

ob thunk unpack dep/plutus-starter
cd dep/plutus-starter
nix-shell --run "cabal new-repl exe:plutus-starter-pab"
set -euo pipefail

DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)

"$(nix-build "$DIR"/.. -A plutus-starter.haskellNixProject.hsPkgs.plutus-starter.components.exes.plutus-starter-pab --no-out-link)"/bin/plutus-starter-pab

0 comments on commit 1b301b2

Please sign in to comment.