This is a reference implementation for an AlpineBits DestinationData server.
The server exposes data from the OpenDataHub API in accordance to the AlpineBits format.
To learn what endpoints and features from the AlpineBits DestinationData standard are implemented in the reference server, visit its OpenAPI documentation where you can also find a Swagger page to interact with the running server.
To install the required dependencies, run:
npm install
The server requires an .env
file from which it loads general configurations.
You can reuse .env.example
or create your own.
To use .env.example
, run:
cp .evn.example .env
To run the server, execute:
npm run server
We set up the server to listen to HTTP request on the port 8080.
To run the end-to-end tests, run:
npm run test
To deploy the server with Docker, run:
docker-compose build
docker-compose start
Note:
-
The server needs to be running for these tests to be properly executed.
-
These commands must be executed from within the project's folder.
-
Please set the environment variables as you need within the '.env' file.
-
The whole test suite may take between 15 and 25 seconds to be executed, as it makes multiple HTTP requests to the OpenDataHub API.
For the tests, we are using the Jest framework.