Skip to content

soupdevsolutions/go-be-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-be-starter

Template for starting a BE application in Go.

Prerequisites

Getting Started

To get started with the project, run the following commands (if you do not want to use just, you can run the commands from the .justfile directly).

  1. Clone the repository:
git clone https://github.com/Mirch/go-be-starter 
mv go-be-starter <project-name>
cd <project-name> 
  1. Initialize the project:

The <project-name> will change the Go module name (feel free to change this with a find-and-replace), while the <database-name> will change the local database name in the local config and scripts.

just init <project-name> <database-name>
  1. Run the project

This will start the local database container and run the Go project.

just start-local

You can test that everything is working by calling the /api/hello endpoint:

curl http://127.0.0.1:8080/api/hello

Working with the project

  1. Creating migrations

To create a new migration, run the following command:

just create-migration <migration-name>

This will create a .up and .down file in the migrations directory, where you can write your SQL queries.

About

Template for starting a BE application in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published