northwind-frostpunk
a tutorial exploring golang, the northwind database, and the post apocalypse
This tutorial is geared towards Mac users.
Day 1 Overview
- setup and connect to postgres
- learn a bit of golang
- connect golang to postgres
- explore the database and learn about CTEs
- play with the data & time inspired by Frostpunk!
PostgreSQL
northwind_psql is a github repo that sets up Postgres with a docker container.
In addition to its readme, I would add that the following setup:
Connection
host: localhost
username: postgres
password: postgres
dname: northwind
port: 55432
Initialy, I found it challenging to connect to the database running in its docker and this is connection details that I ended up using by trial and error.
Golang
I followed this golang getting-started tutorial as a refresher since I hadn’t touched golang in several months.
Next, after I was to output some pithy text and learned the go mod tidy
command, I tackled this go and postgres tutorial.
As I already wrestled the postgres setup, the code provided in the tutorial worked right away. Now, I wanted to import my own function into my main project so I could log a pithy quote. I reviewed the go mod tutorial and converted my original hello.go script into a function that I could import.
— Sept 21/2022 —
Day 1 took me about 4 hours in 2 sessions
As I accomplished the first 3 steps in my plan, I think I’ll needed a couple more hours to put the finishing touches on this guided tutorial. I still need to:
- explore the database and learn about CTEs
- play with the data & time inspired by [Frostpunk](https://en.wikipedia.org/wiki/
Anyways, I’m happy with this progress
Day 2 Survive the night!
coming soon