A RESTful and a GraphQL API exposing Voorhoede website content.
The API is backed by a DatoCMS instance where content is managed.
The API and its documentation is available on voorhoede-colibri-api.now.sh. Note that because it runs on the free tier of Now, it needs to spin up if it isn’t used for a while — which makes it slow the first time ’round 😴.
- Clone the repository.
- Copy
.env.example
to.env
. You can find theDATA_API_TOKEN
in the CMS settings > API Tokens. The CMS can be accessed using theshared@voorhoede.nl
account (details in LastPass). - Run
npm install
. Then use any of the pre-configured scripts.
This project requires Node.js (>= v8) and npm (comes with Node).
After installing dependencies using npm install
the following scripts are available:
npm run ... |
Description |
---|---|
data |
Downloads all data from CMS to the file system. |
deploy |
Deploys application to now and aliases latest deploy to voorhoede-colibri-api.now.sh. |
dev |
Starts local server with auto restart on file change on http://localhost:2473 . |
start |
Starts local server in production mode on http://localhost:2473 . |
test |
Run automated endpoint tests. |
watch |
Run test s on file changes. |