зеркало из
1
0
Форкнуть 0
health-cards-validation-SDK/shl-server
Larry Joy 7d92802b78 fix eslint issues 2023-01-30 12:42:29 -08:00
..
public Add SHL test server; update SHL tests; 2023-01-24 10:19:13 -08:00
shl preserve empty folder 2023-01-24 15:59:35 -08:00
src fix eslint issues 2023-01-30 12:42:29 -08:00
.gitignore Add SHL test server; update SHL tests; 2023-01-24 10:19:13 -08:00
README.md Add SHL test server; update SHL tests; 2023-01-24 10:19:13 -08:00
package-lock.json Add SHL test server; update SHL tests; 2023-01-24 10:19:13 -08:00
package.json Add SHL test server; update SHL tests; 2023-01-24 10:19:13 -08:00
tsconfig.json fix build scripts 2023-01-24 13:22:47 -08:00

README.md

SMART Health Links Test Server

A simple implementation of a SMART Health Links server for testing purposes.
This should not be used in production.


Build

cd ./shl-server
tsc

Run

node ./src/server.js

Port

By default, the SHL server listens on port 8090.
To change this, update the port in the ./shl-server/src/config.ts file and rebuild.


Data

Data for the server is placed in the ./shl folder in a specific JSON format or created with the 'create-link' rest call.
See the html sample in ./public/index.html



REST Endpoints


This adds new data to the server and returns a new SMART Health Link to retrieve that data.

POST http://localhost:8090/create-link  data:SHLLinkRequest

<base-url>/*

This is for requesting a manifest by a particular random path:

POST http://localhost:8090/ERn18l4lL3_5yPXMSzx3ZejyMM_XIeWeseXa3DXsJD0  data:ShlinkManifestRequest

<base-url>/shl/*

This is for requesting a manifest file by a particular random path:

GET http://localhost:8090/shl/05pHiEfsMU1kLb9-oTVknO4VUB9oP6Ot4ET46cjJFzU