Golang postgres
Use this git repo as a reference implementation.
The above repo contains a .sb.yml
file which is a specification of the entire app’s configuration. Check .sb.yml file for more information.
This will create a Golang based web server which talks to a Postgres DB and helps you manage TODOs.
Preparing your code
The .sb.yml
file contains a build variable to preserve the static files needed to render the app. It contains 2 environment variables to indicate the application port and DB port.
It also creates a postgres DB called todo-db
to store the todo data.
The db/db.go
contains code to fetch DB config from environment variables.