Skip to content

This is a base project template for building web applications using Golang with the Fiber framework, Goqu for database operations, and PostgreSQL as the database. Configuration is managed via an env file.

Notifications You must be signed in to change notification settings

shellrean/golang-base-project-cean-directory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang Base Project

This is a base project template for building web applications using Golang with the Fiber framework, Goqu for database operations, and PostgreSQL as the database. Configuration is managed via an env file.

Features

  • Fiber Framework: Fast and minimalistic web framework for Go.
  • Goqu: SQL builder and query library for Go.
  • PostgreSQL: Relational database for storing application data.
  • Env File: Simple configuration management using environment variables.

Getting Started

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    git clone https://github.com/shellrean/golang-base-project-clean-directory.git
    cd golang-base-project-clean-directory
  2. Install dependencies:

    go mod tidy
  3. Create and configure .env file:

    Create a .env file in the root directory and add your configuration variables.

    DB_HOST=localhost
    DB_PORT=5432
    DB_USER=yourusername
    DB_PASS=yourpassword
    DB_NAME=yourdbname
    
    SERVER_HOST=localhost
    SERVER_PORT=8700
  4. Set up PostgreSQL database:

    Make sure your PostgreSQL server is running and create a database matching your .env configuration.

    psql -U yourusername -c "CREATE DATABASE yourdbname;"

Running the Application

Start the application with the following command:

go run main.go

About

This is a base project template for building web applications using Golang with the Fiber framework, Goqu for database operations, and PostgreSQL as the database. Configuration is managed via an env file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages