Clone or download
Latest commit d673666 Nov 11, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Completed example Nov 11, 2017
.gitignore Completed example Nov 11, 2017
Gopkg.lock Completed example Nov 11, 2017
Gopkg.toml Completed example Nov 11, 2017
README.md Completed example Nov 11, 2017
bird_handlers.go Completed example Nov 11, 2017
bird_handlers_test.go Completed example Nov 11, 2017
main.go Completed example Nov 11, 2017
main_test.go Completed example Nov 11, 2017
store.go Completed example Nov 11, 2017
store_mock.go Completed example Nov 11, 2017
store_test.go Completed example Nov 11, 2017

README.md

This is the example repository for this blog post

To run the server on your system:

  1. Make sure you have dep installed
  2. Run dep ensure to install dependencies
  3. Run go build to create the binary (blog_example__go_web_db)
  4. Run the binary : ./blog_example__go_web_db

To run tests:

  1. Run dep ensure to install dependencies
  2. Run go test ./...

Create the birds table before running the application :

create table birds (
id serial primary key,
bird varchar(256),
description varchar(1024)
);

Before running the application, edit the connString variable inside the main function to specify your postgres database connection