This is pingjs monitoring project
- Clone the project
- Install dependencies:
npm install && cd nodered && npm install && cd .. - Run:
NODE_ENV='dev' PORT=1880 npm start - Go Node-RED admin page with http://localhost:1880/nodered/ for breaking things (default access is admin/password)
- Use webservice with http://localhost:1880/ as base URL
- Have fun
Basic running command: env NODE_ENV='dev' PORT=1880 npm start
There are environment variables for setting project options. You can add another environment variables like this: env PASSWORD='$2b$08$mERTOjDUSwijQo5cFLuT0eBaCZ/Kvnv4eOisOqahm.WDAuQ3Hrv4S' ENV='test' PORT=1880 DISABLE_EDITOR=1 ENABLE_PROJECT=0 npm start
NODE_ENV: mandatory, the configuration environment. Can bedev,testandprod.PORT: the TCP port that service listen.80by default.DISABLE_EDITOR: set to1disable the Node-RED editor,0to enable.0by default.ENABLE_PROJECT: set to1enable project in the Node-RED instance,0to disable.0by default.PASSWORD: set the Nodre-RED editor password. Creadentials areadmin/passwordby default.
If AUTH0_DOMAIN env variable is set so Auth0 integration will be use for user authentication:
AUTH0_DOMAIN: Auth0 application DomainAUTH0_CLIENTID: Auth0 application Client IDAUTH0_CLIENTSECRET: Auth0 application Client SecretAUTH0_CALLBACKURL: Callback URL where Auth0 redirect the user to the nodered instance
- Run the project with the Node-RED editor activated and modify flows.
- Test, test and test and test
- Commit your change on
developbranch (or do a pull request ondevelopbranch with Github)
- build
docker build -t project_name . - run
docker run -e NODE_ENV='dev' -e PORT=1880 -p 8080:1880 project_name:latest
TODO