Skip to content

Commit

Permalink
Extend README.md (#7)
Browse files Browse the repository at this point in the history
Add more info to the README on how to run and troubleshoot Marlowe Runner
  • Loading branch information
palas authored Aug 10, 2023
1 parent 0cf55b3 commit f7b2cba
Showing 1 changed file with 44 additions and 17 deletions.
61 changes: 44 additions & 17 deletions README.md
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
```

0 comments on commit f7b2cba

Please sign in to comment.