A REST API, used to extract data from ResMed Airview generated PDF files.
Running the latest published version of this service:
docker run -p 8080:8080 ghcr.io/imec-int/innnobics-sahs-adapters:latest
If you wish to use a specific version, reference another tag (eg '1.0.0')
docker run -p 8080:8080 ghcr.io/imec-int/innnobics-sahs-adapters:v1.0.0
The application will be available at http://localhost:8080
- Clone this repository
cd innnobics-sahs-adapters
- Install node 16.16.0 or use nvm:
nvm use
npm install
- We suggest pm2 to start the application.
npm install pm2
node_modules/pm2/bin/pm2 start src/index.js --name resmed-adapter
to start this service as a daemon application.
- Visit
http://localhost:8080/
to validate that the service is up and running. If not try runningnode_modules/pm2/bin/pm2 ls
To stop the application, use node_modules/pm2/bin/pm2 stop resmed-adapter
We provide Swagger documentation. To validate and test the API:
- start the application:
docker run -p 8080:8080 ghcr.io/imec-int/innnobics-sahs-adapters:latest
. We use docker for this. See above for alternative methods - Access the documentation on
http://localhost:8080/api/docs
Warning and errors are logged to the console in JSON format. You can change the level of detail you wish to see in the logs. The available levels conform to the npm log levels:
{
error: 0,
warn: 1,
info: 2,
http: 3,
verbose: 4,
debug: 5,
silly: 6
}
The log level can be defined through the env variable LOG_LEVEL
.
To illustrate this: docker run -p 8080:8080 -e LOG_LEVEL=debug ghcr.io/imec-int/innnobics-sahs-adapters:latest
would print every log statement, except those of level 'silly'.
This paragraph is intended for developers.
We suggest using nvm to ensure working with the correct node version. If you do not wish to use nvm, please make sure that the node version listed in .nvmrc
matches your currently installed node version. You can verify your node version using the node --version
command. If you do not have node installed, see Node downloads
nvm use
npm install
npm run dev
The website is available on http://localhost:8080/
, the API on http://localhost:8080/