From 8fa2baefa122d5a0179b44c025beee5ecd46d45c Mon Sep 17 00:00:00 2001 From: DeveloperSteve Date: Fri, 17 May 2024 17:17:54 +1000 Subject: [PATCH] updated README and added run.js to src --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c49a32e..6142489 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ An API endpoint that wraps using the Lilypad cli. ## Usage -Run `node src/index.js` to create a local endpoint using the js wrapper, then send a post request containing json with your funded `WEB3_PRIVATE_KEY` key set, see the quick start for more on [getting started](https://docs.lilypad.tech/lilypad/lilypad-milky-way-testnet/quick-start) +Run `node src/index.js` to create a local endpoint using the js wrapper with either `src/run.js` or `src/stream.js`, then send a post request containing json with your funded `WEB3_PRIVATE_KEY` key set, see the quick start for more on [getting started](https://docs.lilypad.tech/lilypad/lilypad-milky-way-testnet/quick-start) The endpoint can then be tested using curl ``` @@ -14,8 +14,6 @@ curl -X POST http://localhost:3000 \ -d '{"pk": "'"$WEB3_PRIVATE_KEY"'", "module": "github.com/lilypad-tech/lilypad-module-lilysay:0.1.0", "inputs": "Message=test"}' ``` -Alternatively run `node src/run.js` or `node src/stream.js` with one of the following scripts - ```js // run.js const { run } = require("./") @@ -29,7 +27,7 @@ run( }) ``` -``` +```js // stream.js const { stream } = require("./") @@ -43,7 +41,7 @@ stream( }) ``` -``` +```js // index.js const fetch = require("node-fetch") const fs = require("fs")