Database & Supabase
Note:
The local supabase postgresql database setup is not required but is convenient, feel free to use any postgresql database setup that you prefer, you only need to set the connection details in the your .env file HOWEVER, this project does make use of Supabase GoTrue API for authentication, so it is still recommended to go through with the local Subapase environment setup.
REQUIREMENTS
- Docker (If on macos, linux, or windows/wsl2 Docker Desktop is a convenient way to to install docker and docker-compose binaries)
- Supabase CLI (uses docker containers to setup a local supabase development environment) can be used conveniently through npx
STEPS
-
Start the local supabase environment (this will use the existing supabase configuration in
supabasedirectory generated from the initialnpx supabase initcommand) e.g.npx supabase startNote the output of the above command to find
SUPABASE_...andDATABASE_...values to environment variables (see.env.example) that need to be set in your local.envfile (these will be needed if you would like the app to interact with the local supabase environment) -
You can access the local supabase environment dashboard on localhost:54323. run
npx supabase statusfor a reminder of local supabase serviecs ports and secrets
easy local testing supabase links:
Golang
REQUIREMENTS
-
A running database to connect to
-
A
.envwith environment variables that suits your development environment (KEEP EXCLUDED FROMN VERSION CONTROL)Feel free to use the following command from the project root directory as a starting point for your
.envfile, the provided example.env.example(ForSUPABASE_...andDATABASE_...env values see output ofnpx supabase initcommand documented above)cp .env.example .env
STEPS
- From the project root directory, run the following command to start the web app
go run main.go