Skip to content

Commit

Permalink
chore: updating README to make it useful
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Burtey committed Oct 6, 2023
1 parent ec62754 commit b979b47
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 9 deletions.
51 changes: 44 additions & 7 deletions apps/boltcard/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,54 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

shell 1:

```bash
core/api % yarn install
core/api % make reset-deps
core/api % bats -t test/bats/ln-receive.bats
core/api % make start
```

shell 2:
```bash
apps/boltcard % bun install
apps/boltcard % make reset-deps
apps/boltcard % bun next
```

shell 3:
```bash
npm run dev
# or
yarn dev
# or
pnpm dev
apps/boltcard % ngrok http 3000
```

update SERVER_URL in config.ts with Forwarding address

shell 4:
```bash
apps/boltcard % bats -t bats/e2e-test.bats
```

for burning the card, need to only do some of the bats tests. we can do that by exiting early
```diff
diff --git a/apps/boltcard/bats/e2e-test.bats b/apps/boltcard/bats/e2e-test.bats
index ad1822e54..5a36a3a87 100644
--- a/apps/boltcard/bats/e2e-test.bats
+++ b/apps/boltcard/bats/e2e-test.bats
@@ -24,6 +24,8 @@ random_phone() {
[[ $(echo $CALLBACK_API_URL) != "null" ]] || exit 1
[[ $(echo $CALLBACK_UI_URL) != "null" ]] || exit 1

+ exit 1
+
# TODO: test CALLBACK_UI_URL

# Making the follow-up curl request

```


Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
Expand Down
4 changes: 2 additions & 2 deletions apps/boltcard/bats/e2e-test.bats
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load "../../../test/bats/helpers/setup-and-teardown"
load "../../../test/bats/helpers/ln"
load "../../../core/api/test/bats/helpers/setup-and-teardown"
load "../../../core/api/test/bats/helpers/ln"

random_phone() {
printf "+1%010d\n" $(( ($RANDOM * 1000000) + ($RANDOM % 1000000) ))
Expand Down

0 comments on commit b979b47

Please sign in to comment.