A RESTful API wrapper for the database our project, NKSS, relies on!
Clone the repository:
git clone https://github.com/nkss-dev/breadboard
- Setup initial configuration: Populate
sample.env
with its corresponding values. - The
HMAC_SECRET
can be any string you like as long as you have a valid JWT token for it. To generate this token, please executego run dev/genjwt.go <role> <rollno>
in the root directory after setting this env variable. DATABASE_URL
refers to the PostgreSQL instance URL that you wish to use.PORT
refers to the port number that you wish to host the backend at.
- The
- Setup initial configuration: Populate
- Install dependencies: You need the following deps to run this project:
- go 1.18
You can either install these deps externally or simply run nix develop to enter a shell environment with all the dependencies installed.
- Generate the required query files:
sqlc generate
- Run the project:
go run cmd/main.go
Well, it's a RESTful API. What else?