schfkt / rest-api

Test assignment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Readme

You can run the APP in with docker. You need to have docker and docker-compose installed locally.

To run the app:

$ docker-compose up

And then you can access it at http://localhost:1337

At the moment, only the method to issue license key is implemented:

# request
$ curl --request POST \
  --url http://localhost:1337/license-keys \
  --header 'content-type: application/json' \
  --data '{
	"userId": "doge",
	"features": ["makeFrappe"]
}'

# response
{
  "licenseKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJkb2dlIiwiaWF0IjoxNTYwODQ4MTAyfQ.1txpI2oC-yEeFuGTj3l6VM-WGDbJ6CZhCMyohy3PBvs"
}

About

Test assignment


Languages

Language:TypeScript 96.7%Language:Dockerfile 2.0%Language:Open Policy Agent 1.2%