golang-starter

module
v0.0.0-...-822262a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2023 License: Apache-2.0

README

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL