Giter Site home page Giter Site logo

pixelpunch / cardano-marlowe-runner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from input-output-hk/marlowe-runner

0.0 0.0 0.0 37.61 MB

A simple app which allows you to deploy and progress through Marlowe contract on Cardano.

License: Apache License 2.0

Shell 0.21% JavaScript 1.30% TypeScript 16.00% PureScript 64.72% Nix 9.88% HTML 0.79% Dockerfile 0.06% SCSS 1.60% Gherkin 3.59% Dhall 1.86%

cardano-marlowe-runner's Introduction

Marlowe Runner

A simple web app which allows you to deploy and progress through Marlowe contracts on Cardano easily from the browser.

Installation

The application itself is a fully static JS app which requires Marlowe Runtime for running. A release package is providing a directory which could be served by your favorite HTTP server but in order to use it you should setup a minimal configuration.

Configuration

In order to configure the application your HTTP server should serve a config.json. To do so, create the file public/config.json with the following structure:

{ "marloweWebServerUrl": 'https://link-to-runner-instance', "develMode": false }

Development

Prerequisites

Ensure you have nix installed on your system and an instance of the Marlowe Runtime's Webserver running pointed to the desired Cardano network.

Setup

Enter the development shell:

nix develop

Install the necessary dependencies:

npm install

Run the tests:

spago test

Running devel server

To start the server you can use the npm run start command, for example:

MARLOWE_WEB_SERVER_URL="http://localhost:3780" npm run start

In the previous example:

  • MARLOWE_WEB_SERVER_URL: Specifies URL for the Marlowe Runtime Web server.

After this, the Marlowe Runner instance should be available by default at: http://localhost:8080/

Bundling

If you would like to use optimzed bundle of the project you can run t:

MARLOWE_WEB_SERVER_URL="http://localhost:3780" npm run bundle

Development with Nix

This repository uses nix to provide a development and build environment.

For instructions on how to install and configure nix (including how to enable access to our binary caches), refer to this document.

If you already have nix installed and configured, you may enter the development shell by running nix develop.

You can build the static site with Nix using:

nix build .#marlowe-runner

Whenever you make changes to package-json.lock or packages.dhall packages, you must run the gen-nix-lockfiles script (available inside the nix develop shell) to recreate nix/spago-packages.nix and nix/npm-deps-hash.nix.

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.

Contributing

Before contributing, please format the source code using the following command from within the nix development shell:

purs-tidy format-in-place 'src/**/*.purs'

cardano-marlowe-runner's People

Contributors

paluh avatar ladamesny avatar yveshauser avatar github-actions[bot] avatar bjornkihlberg avatar zeme-wana avatar shlevy avatar bwbush avatar palas avatar hrajchert avatar renebarbosafl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.