mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-08 06:22:53 +00:00
docs: update README.md
This commit is contained in:
@@ -22,11 +22,15 @@ npm run build
|
||||
To start the plugin, you need to execute the code in "CLI" 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:
|
||||
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
|
||||
|
||||
* Modify the default values in `cli.ts` to your needs:
|
||||
|
||||
@@ -72,7 +72,7 @@ const plugin = new MinimalPlugin(
|
||||
|
||||
pluginClient.registerPlugin(plugin)
|
||||
.then(() => {
|
||||
Logger.ok(`Successfully registered plugin '${options.pluginName}' on /${options.urlSegment} .`);
|
||||
Logger.ok(`Successfully registered plugin '${options.pluginName}' on /${options.routeName} .`);
|
||||
})
|
||||
.catch((err: Error) => {
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user