Skip to content

krisnaw/go-workout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workout App built in Go

This application is a simple Workout App built in Go to showcase my skills in utilizing the Go programming language. It demonstrates routing, database management, and health check functionality with a modular structure.

Features

  • REST API implementation.
  • Modular structure for scalability and maintainability.
  • Database integration and utility functions.
  • Health check endpoint for monitoring uptime.
  • Easy-to-understand codebase for learning and experimentation.

Technologies Used

  • Language: Go (Golang)
  • Database: Postgres, goose(for migrations)
  • Additional Tools/Packages: go-chi

Folder Structure

.
├── internal                # Compiled files (alternatively `dist`)
│       ├── api             # Route handler
│       ├── app             # application's core components, including the database, logger, API handlers, and health check functionality.
│       ├── routes          # Api End-points
│       ├── store           # Database connections
│       └── utils           # Utilities
├── migrations              # Migrations directory
└── README.md

Prerequisites

Make sure you have the following installed on your machine before running the application:

  1. Go (version 1.23 or later)
  2. (Add any other necessary installations, such as Docker/Postgres if applicable.)
  3. (Include details of third-party packages required by the app and how they can be installed.)

Installation

  1. Clone this repository to your local system:

    git clone <repository-url>
    cd <repository-folder>
  2. Run the following command to download all dependencies:

    go mod tidy
  3. Configure your database (if applicable) by editing the configuration file.


Usage

  1. Run the application:

    go run main.go
  2. Access endpoints using tools like curl, Postman, or a web browser.

    For example:

    • GET /health - Returns app health status.

API Endpoints

Method Endpoint Description
GET /health Health check endpoint
POST /workouts Create a workout
GET /workouts List all workouts

(Add more as needed.)


Database Migrations

If your application has migrations, include instructions for handling them:

  1. To apply database migrations, run:
    (Add command or tool, e.g., migrate up, sqlc, etc.)

About

CRUD Api build in GO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages