Skip to content

initialcapacity/golang-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang starter

Build results codecov

An application continuum style example using Golang that includes a single web application with 2 background workers.

  • Basic web application
  • Data analyzer
  • Data collector

The example showcases on the below technologies -

Getting Started

Install the following prerequisites.

For local development

Create a user and database.

psql postgres < databases/create_databases.sql

Run the tests.

go clean -testcache && go test ./...

Run the apps locally.

go run cmd/basicwebapp/app.go

Build and run the apps locally.

go install cmd/basicwebapp/app.go
~/go/bin/app

For docker

Build with Pack.

pack build golang-starter --builder paketobuildpacks/builder:tiny

Modify you local database file permissions.

chmod 775 ./databases/docker/initdb.d/create-databases.sh
chmod 775 ./databases/docker/migrate-databases.sh

Run with docker compose.

docker-compose up

That's a wrap for now.