This is the home of the backend code for our seed application!
Go v1.18
The database should be hosted locally on a POSTGRES server, ideally on an empty database, running the server will automatically populate the database.
- Install Postgres locally
- Create a local database in your postgres server
- Create a .env file in your local root folder and paste the connection string of the created database inside variable 'DATABASE_CONNECTION_STRING'.
eg:
DATABASE_CONNECTION_STRING='postgres://<username>:<pwd>@localhost:5432'
- Follow the next steps to run locally.
- Run
go run .
- Server runs at
http://localhost:9000/
- Refer to the API Documentation to use the API.
Import the Postman collection for the API's from the API_Collection.json
file
github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/lib/pq v1.10.7 github.com/morkid/paginate v1.1.4 gorm.io/driver/postgres v1.4.4 gorm.io/gorm v1.24.0
- How to run a custom join table