feat: initial users store

This commit is contained in:
2023-06-01 12:26:43 +02:00
parent 192929229f
commit d940a04d05
4 changed files with 43 additions and 11 deletions
+16
View File
@@ -22,6 +22,22 @@ After you have installed all dependencies you can now run the app.
Run `npm start` to start a local server.
The port will be displayed to you as `http://0.0.0.0:3333` (or if you prefer IPv6, if you're using `express` server, then it's `http://[::1]:3333/`).
## Initial users
Adding a JSON file with the following layout will populate the users store when starting:
```json
{
"email@test.com": {
"given_name": "name",
"family_name": "family",
"user_id": "id"
}
}
```
By default `./users.json` will be read but this can be overridden by setting the environment variable `USERS_FILE`.
## API Documentation
### `GET` /token/:username