3.3.0 • Published 4 years ago

molgenis-node-lifelines-edge v3.3.0

Weekly downloads
12
License
LGPL-3.0
Repository
github
Last release
4 years ago

Edge server for Lifelines order management

Edge server supplies a service to approve lifelines-catelog orders and submits the order to the lifelines platform.

EndPoints

GET /version

  • Returns edge-server version information in json format

POST /edge-server/approve?ordernumber=12345

  • Calls molgenis service to approve the order
  • Calls data platform send out the order
  • Expects ordernumber as query param

POST /edge-server/submit?ordernumber=12345

  • Send notification that the order has been submitted
  • Expects ordernumber as query param

Usage

Prerequisites:

node = lts/erbium

Install:

npm install

Run:

node server.js

By default the server listens at port 3000, see Enviroment section on changing the port.

Debug:

node --inspect server.js

Environment

In order for the edge-server to handle an 'approve order' request the request must be made by a user that has the 'ROLE_lifelines_MANAGER' role.

EDGE_SERVER

  • EDGE_SERVER_PORT: port-number

MOLGENIS or other backend

Data platform

REQUIRED FOR EMAIL SUBMISSION NOTIFICATION

OPTIONAL FOR EMAIL SETTINGS

  • EDGE_SERVER_MAIL_HOST: 'some.host.org' // defaults to 'smtp.rug.nl',
  • EDGE_SERVER_MAIL_PORT: 25 // some port defaults to 25,
  • EDGE_SERVER_MAIL_SECURE: true // boolean defaults to true,
  • EDGE_SERVER_MAIL_AUTH: true // boolean, defaults to 'true'
  • EDGE_SERVER_MAIL_AUTH_USER: '' // string required is auth is set to true
  • EDGE_SERVER_MAIL_AUTH_PASS: '' // string required is auth is set to true
  • EDGE_SERVER_MAIL_TLS_REJECT_UNAUTHORIZED: true // boolean defaults to 'true'
  • EDGE_SERVER_MAIL_TLS_ALLOW_INSECURE_AUTH: false // boolean defaults to 'false'
  • EDGE_SERVER_MAIL_IGNORE_TLS: boolean defaults to 'false'
  • EDGE_SERVER_MAIL_LOGGER: true // boolean set to true log sending email, defaults to 'true'
  • EDGE_SERVER_MAIL_DEBUG: false // boolean set to true for detailed transport logging defaults to 'false'