A REST-API web application built using expressjs and redis. It is used to distribute / access data extracted by the VIGAD Desktop Application.
-
Customize settings in .env:
- PORT: The Port the web application listens on
- ALLOWED_ORIGINS: A comma seperated list of origins that are allowed to access the api
- TOKEN_HASH: A hash value of an access token that every client needs to provide. Generated using bcrypt.hash
- REDIS_HOST: The address of a redis-stack (RedisJSON required)
- REDIS_PORT: The port the redis db listens on
-
Build the application:
npm run build
-
Start the application:
npm run start
Access data previously uploaded by VIGAD using a simple http GET request:
GET http://<HOST>:<PORT>/session/<SessionToken>/data
HEADERS:
Authorization: Bearer <Token>
Content-Type: application/json
<SessionToken> specified under "Session Settings" in VIGAD
<Token> used to generate TOKEN_HASH