Running locally, two options
Install the usual way
-
clone repository locally
-
install it
npm install
- configure it. Create a .env file in root folder with the following
HOSTNAME=https://www.example.com
PORT=443
TOKENREQUIRED=false
FHIRTENANTID=
FHIRCLIENTID=
FHIRCLIENTSECRET=
FHIRSUBSCRIPTIONID=
FHIRSERVER=
PATIENT=**NHS Number, e.g. test NHS Number like 9000000009**
XAPIKEY=**key value, e.g. AWS FHIR Works developer key**
AUTH_TOKEN=**oauth token**
AUTH_TOKEN_PDS=
XAPIKEY_PDS=
PDSENDPOINT=https://sandbox.api.service.nhs.uk/personal-demographics/FHIR/R4
SSODOMAIN=
SSOISSUER=
SSOCLIENTID=
SSOCLIENTSECRET
SSOCALLBACKURL=
PASSPORTSECRET=
AUTHENTICATE=false
- run it
node ./server.js
or
nodemon ./server.js
- access it via web browser
-
Create branch in GitHub project
-
Locally
$git pull
$git checkout <branch name>
-
Make changes to code and other files as required
-
Once you are happy with your changes and have run an manually tested them, npm test to run test pack before you commit
-
Commit changes
$git add .
$git commit . -m <"commit message">
$git push
- Return to GitHub and create Pull Request
-
clone repository locally
-
build local Docker image
docker build . -t fhirnodejsclienttest
- start container
docker run -p 3000:3000 -d -e HOSTNAME=http://server.fire.ly -e PORT=80 -e XREQUESTID=60E0B220-8136-4CA5-AE46-1D97EF59D068 -e XCORRELATIONID=11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA fhirnodejsclienttest
- access it via web browser