https://github.com/schfkt/rest-api
Test assignment
https://github.com/schfkt/rest-api
Last synced: 2 months ago
JSON representation
Test assignment
- Host: GitHub
- URL: https://github.com/schfkt/rest-api
- Owner: schfkt
- Created: 2019-06-15T19:00:16.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T11:32:57.000Z (over 2 years ago)
- Last Synced: 2025-02-17T11:42:19.533Z (5 months ago)
- Language: TypeScript
- Size: 951 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# 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"
}
```