1.3.0 • Published 4 years ago

@open-website-status/provider v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Open Website Status provider

npm

This is the CLI provider for Open Website Status

Usage

Install using:

npm i @open-website-status/provider -g

After installing, you can use the terminal command:

ows-provider

The configuration can be provider in the following ways:

  • As a command parameter
ows-provider -t MY_TOKEN -s http://example.com:1234
  • Set in the config
ows-provider config-set token MY_TOKEN
ows-provider config-set server http://example.com:1234
  • Passed as an environmental variable
  • Provided in a .env file (using the same key as the Environmental variable)
    OWS_TOKEN=MY_TOKEN
    OWS_SERVER=http://example.com:1234
If you provide the setting in multiple ways (eg. as a command line parameter and as an environmental variable) the priority is the same as the order of the list above

| Command argument  | Config key | Environmental variable | Description          | Required | Default                             |
|-------------------|------------|------------------------|----------------------|----------|-------------------------------------|
| -t, --token TOKEN | token      | OWS_TOKEN              | Provider token       | **YES**  |                                     |
| -s, --server URL  | server     | OWS_SERVER             | Backend server URL   | no       | https://api.open-website-status.com |
| -p, --path PATH   | path       | OWS_PATH               | Provider socket path | no       | /provider-socket                    |

## Running as a service

If you want to run the script as a service you can use a tool such as [pm2](http://pm2.io/).

Install **pm2** using
```bash script
npm i -g pm2

You can then start the service using

pm2 start ows-provider

To stop it just run

pm2 stop ows-provider

*NOTE: for some reason this doesn't work on Windows. Check Unitech/pm2#2037 for more details.*

Check this pm2 guide for instructions to start the service on system boot.

1.2.2

4 years ago

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago