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
2023-07-31 15:44:38 +01:00
..
sql feat(backend): Create Users and Get JWT 2023-07-26 21:16:25 +01:00
.gitignore feat(backend): Create Users and Get JWT 2023-07-26 21:16:25 +01:00
go.mod feat(backend): Create Users and Get JWT 2023-07-26 21:16:25 +01:00
go.sum feat(backend): Create Users and Get JWT 2023-07-26 21:16:25 +01:00
main.go feat(backend): update and delete users 2023-07-28 18:17:01 +01:00
README.md hotfix(backend): create real error for missing JWT_SECRET 2023-07-31 15:44:38 +01:00
user.go hotfix(backend): create real error for missing JWT_SECRET 2023-07-31 15:44:38 +01:00
util.go feat(backend): Create Users and Get JWT 2023-07-26 21:16:25 +01:00

Backend Usage

In order to run the backend, you need to have sqlite3 installed on your system. Once you do, make a database file named users.db and initialize it with the sql/init.sql script:

$ cat sql/init.sql | sqlite3 users.db

You 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