# README
RESTful-API-in-Go
A Authentication built with Go, GORM, and the Gin framework.
Features
- User can Registration
- User Login
- Middleware
Technologies Used
- Backend: Go, PostgreSQL
- Containerization: Docker
Requirements
- Go 1.22+
- A SQL database (e.g., PostgreSQL, MySQL, SQLite)
- Git
Installation
- Clone the repository:
git clone https://github.com/Hrishikesh-Panigrahi/Auth-in-Go.git
cd Auth-in-Go
- Install dependencies:
go mod tidy
And you are all set
Usage
- Run the application:
air
Docker
- Pull the Docker Image:
docker pull hrishikeshpanigrahi025/Auth-in-go
- Run the Docker container:
docker run -p 8000:8000 hrishikeshpanigrahi025/Auth-in-go
Project Structure
The project structure follows a standard Go project layout:
GoCMS/
├── controllers/
├── initializers/
├── middleware/
├── models/
├── Dockerfile
├── main.go
└── go.mod
- initializers/: Database initializers
- controllers/: Handlers for the different routes
- middleware/: Handling middleware
- models/: Database models
- Dockerfile: Docker configuration
- main.go: Entry point of the application
- go.mod: Go module file
Run Locally
To run the project locally, you have 3 options:
1. Launch Debugger
- Open your project in Visual Studio Code.
- Set breakpoints as needed.
- Launch the debugger by pressing F5 or by selecting Run > Start Debugging from the menu.
2. Run Air:
Ensure you have Air installed for live reloading.
- Start Air by running the following command in your terminal:
air
3. Run go run main.go Command
-
Open your terminal.
-
Navigate to the project directory.
-
Run the following command to start the application:
go run main.go
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author