simple-webserver-script-launcher
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

simpleWebServerScriptLauncher

Listen on a method//:ip:port/path and launch a script

Installation and use

npm i -g simple-webserver-script-launcher
simple-webserver-script-launcher

Configuration is done by environment variables

Here are how to use theses variables (with their default values)

ADDRESS=0.0.0.0 PORT=8888 METHOD=POST URL_PATH=runScript SCRIPT=script.sh simple-webserver-script-launcher

Adding multiple routes

It's possible to add new routes with the same 3 variables METHOD , URL_PATH and SCRIPT with a numbered suffix

METHOD_0=GET URL_PATH_0=runScript SCRIPT_0="echo 'ok'" simple-webserver-script-launcher

Dependents (0)

Package Sidebar

Install

npm i simple-webserver-script-launcher

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

11.1 kB

Total Files

8

Last publish

Collaborators

  • slhad