Skip to content

vinayak-chavan/e-commerce-backend-go-lang-

Repository files navigation

My E-commerce Project

Description

This project is a basic e-commerce application built with Go, Gin, and GORM. It supports user registration, login, cart management, and order processing.

Prerequisites

  • Go
  • Git
  • PostgreSQL

Setup Instructions

  1. Clone the Repository

    git clone https://github.com/vinayak-chavan/e-commerce-backend-go-lang-
    cd e-commerce
  2. Install Dependencies

    go mod tidy
  3. Set Up Environment Variables

Change .env file in the root directory:

DB_HOST=localhost
DB_PORT=5432
DB_USER=your_db_user
DB_PASS=your_db_password
DB_NAME=your_db_name
DB_PORT=5432
DB_SSLMODE=disable
DB_TIMEZONE=Asia/Kolkata
PORT=8000
SECRET=ThisIsSecretKey
  1. Run the Project

    go run main.go
  2. For swagger documentation (Optional)

    go install github.com/swaggo/swag/cmd/swag@latest
    go get -u github.com/swaggo/gin-swagger
    go get -u github.com/swaggo/files
  3. Generate the Swagger Documentation

    swag init
  4. Access Swagger UI

Open your browser and navigate to http://localhost:8000/swagger/index.html to view the Swagger UI for your APIs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages