docs: update README.md

This commit is contained in:
Rainer Killinger
2021-09-07 13:12:26 +02:00
parent 109b9e3cbd
commit 1cdac9f60d
2 changed files with 7 additions and 3 deletions

View File

@@ -22,11 +22,15 @@ npm run build
To start the plugin, you need to execute the code in "CLI" script: To start the plugin, you need to execute the code in "CLI" script:
```shell script ```shell script
node lib/cli.js run <backendURL> <pluginName> <routeName> <URL> <port> node lib/cli.js -b <backendURL> -n <pluginName> -r <routeName> -u <URL> -p <port>
With fallback values being: With fallback values being:
node lib/cli.js run http://localhost:3000 minimal-plugin minimalPlugin http://localhost 4000 backendURL = http://localhost:3000 , pluginName = minimal-plugin ,
routeName = minimalplugin , URL = http://localhost, port = 4000
``` ```
Using environment variables you can set backendURL via `STAPPS_BACKEND`, URL via `PLUGIN_URL` and port via `PLUGIN_URL`.
## Creating your own plugin ## Creating your own plugin
* Modify the default values in `cli.ts` to your needs: * Modify the default values in `cli.ts` to your needs:

View File

@@ -72,7 +72,7 @@ const plugin = new MinimalPlugin(
pluginClient.registerPlugin(plugin) pluginClient.registerPlugin(plugin)
.then(() => { .then(() => {
Logger.ok(`Successfully registered plugin '${options.pluginName}' on /${options.urlSegment} .`); Logger.ok(`Successfully registered plugin '${options.pluginName}' on /${options.routeName} .`);
}) })
.catch((err: Error) => { .catch((err: Error) => {
throw err; throw err;