-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more info to the README on how to run and troubleshoot Marlowe Runner
- Loading branch information
Showing
1 changed file
with
44 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,55 @@ | ||
# marlowe-runner | ||
# Marlowe Runner | ||
|
||
A simple web app which allows you to deploy and progress through Marlowe contracts on Cardano easily from the browser. | ||
|
||
## Installation | ||
|
||
* Nix: | ||
```shell | ||
$ nix develop | ||
``` | ||
### Prerequisites | ||
|
||
## CI | ||
Ensure you have `nix` installed on your system and an instance of the [Marlowe Runtime](https://docs.marlowe.iohk.io/docs/getting-started/deployment-options)'s Webserver running pointed to the desired Cardano network. | ||
|
||
* Testing: | ||
```shell | ||
$ spago test | ||
``` | ||
### Setup | ||
|
||
* Formatting: | ||
```shell | ||
$ purs-tidy format-in-place 'src/**/*.purs' | ||
``` | ||
Enter the development shell: | ||
```bash | ||
nix develop | ||
``` | ||
|
||
## Staging server | ||
Install the necessary dependencies: | ||
```bash | ||
npm install | ||
``` | ||
|
||
Start the server with | ||
Run the tests: | ||
```bash | ||
spago test | ||
``` | ||
|
||
## Running | ||
|
||
To start the server you can use the `npm run start` command, for example: | ||
```bash | ||
NETWORK="preview" MARLOWE_WEB_SERVER_URL="http://localhost:3780" npm run start | ||
``` | ||
npm run start | ||
|
||
In the previous example: | ||
- `NETWORK`: Specifies the Cardano network to use. In the example above, it's set to `preview`. | ||
- `MARLOWE_WEB_SERVER_URL`: Specifies URL for the Marlowe Runtime Web server of the network specified (`NETWORK`). | ||
|
||
After this, the Marlowe Runner instance should be available by default at: `http://localhost:8080/` | ||
|
||
### Troubleshooting | ||
|
||
Ensure that: | ||
- The protocol (`http` or `https`) is correct. | ||
- There's no extra `/` at the end of the URL. | ||
|
||
If you get a blank page when opening Marlowe Runner in your browser, it may be necessary that you install a light wallet like [Nami](https://namiwallet.io/). | ||
|
||
## Contributing | ||
|
||
Before contributing, please format the source code using the following command from within the `nix` development shell: | ||
|
||
```bash | ||
purs-tidy --format-in-place src/**/*.purs | ||
``` |