0.1.5 • Published 6 years ago
@philips-software/crocs-api v0.1.5
Crocs API
Crocs service access point
Installation
First create a folder where you want your service api to be installed. Then install the service as follows:
$ mkdir crocs-api
$ cd crocs-api
$ yarn add @philips-software/crocs-api
$ yarn setupUsage
To directly run the service, use:
./node_modules/.bin/crocs-apiWith PM2
You can take of advantage of pm2 to start the api service. Make sure you have pm2 installed globally:
$ yarn global add pm2and ensure it is in $PATH:
export PATH=$PATH:/home/pi/.yarn/binStart service
$ pm2 start ecosystem.config.jsList all services
$ pm2 listSettings on a service
$ pm2 show crocs-apiLogs
To show both stdout and stderr logs run:
$ pm2 logs crocs-apiThis shows all the logs of crocs-api and outputs the last 15 lines (the default).
To see only standard output logs, and print more lines from the output use:
$ pm2 logs crocs-api --out --lines 150Restart process after editing ecosystem
$ pm2 delete ecosystem.config.js
$ pm2 start ecosystem.config.jsDebug application from this directory
$ ./index.js