Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

fl0zone/template-go-pg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang + Gin + Postgres Starter Pack

Backend engineering, supercharged.

Overview

Use this repository to get up and running on FL0 with the following stack:

Language Golang
Framework Gin
Router httprouter
ORM None
Database Postgres

Getting Started

We recommend using the provided Docker Compose configuration for local development. Our Docker configuration includes:

  1. Automatically create both database and app server easily
  2. Hot-reloading of code for local development
  3. Production-ready minified image
  4. Database admin interface using Cloudbeaver

However, you can still use this repo without Docker! See the instructions below.

Using Docker

  1. docker compose up (initial build can take a couple of mins)
  2. That's it! Visit http://localhost:8080 to see your app running

Without Docker

If you don't want to use Docker, make sure you have a Postgres database that you can connect to.

  1. go build -o main
  2. Copy the provided .env.example file and rename it to .env
  3. ./main
  4. Visit http://localhost:8080 to see your app running

Deploying to FL0

Checkout our Getting Started Guide in the FL0 documentation!

Using the Database Admin Interface

If you use our Docker Compose file you have access to a local instance of Cloudbeaver. To access it, navigate to:

  1. Navigate to http://localhost:8081
  2. Follow the setup wizard to create your admin account
  3. Add a new connection using the PostgreSQL driver and the URL below

jdbc:postgresql://db:5432/fl0-starter-db?user=admin&password=admin

Questions

If you have any questions about FL0 or this template codebase please head on over to our Discord channel.

Issues

Any issues or feature requests can be raised on the Issues page of this repo.

License

This template repository is MIT licensed.