Skip to content

Prasenjit43/golang-jwt-project

Repository files navigation


Golang JWT Token Project

This is a simple project demonstrating how to implement JWT (JSON Web Tokens) authentication in a Golang web application using the Gin framework.

Getting Started

Prerequisites

  • Go (Golang) installed on your machine.
  • Understanding of basic Golang concepts.
  • Basic knowledge of JWT (JSON Web Tokens).

Installation

  1. Clone the repository:

    git clone https://github.com/Prasenjit43/golang-jwt-project.git
  2. Navigate to the project directory:

    cd golang-jwt-project
  3. Install dependencies:

    go mod tidy

Usage

  1. Start the server:

    go run main.go
  2. By default, the server runs on port 8000. You can specify a different port by setting the PORT environment variable:

    PORT=8080 go run main.go
  3. Once the server is running, you can test the endpoints using tools like cURL or Postman.

Endpoints

  • /auth: Endpoint for authentication.
  • /user: Endpoint for user authentication.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages