This repository has been archived on 2024-03-23. You can view files and clone it, but cannot push or open issues or pull requests.
ambition-legacy/backend/README.md
Abdulmujeeb Raji 8cf3bbda1f feat(backend): update and delete users
The title says most of it. For authentication, the token gotten from the POST
method can be put as a 'Token' header. It's then validated before being used.

Other changes caused by this update are:
- Fixed a bug where the creation token was unusable due to lacking the
  user password hash
- Changed the signing method to HMAC, requiring a string for encryption
  This is mentioned in the README.md
2023-07-28 18:17:01 +01:00

15 lines
471 B
Markdown

# Backend Usage
In order for this to work, you need to have [sqlite3](https://sqlite.org)
installed on your system. Once you do, make a databse called `users.db`
and initialize it with the `sql/init.sql` script:
```sh
$ cat sql/init.sql | sqlite3 users.db
```
You also need to create a `.env` file with the following variables:
- `JWT_SECRET`: Required. A cryptographically secure string used to encode
tokens.
- `PORT`: Optional. Overrides the default port of `7741`