Skip to content

LeDavidcb/SimpleServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleServer

A simple HTTP server written in Go to demonstrate secure request handling using JWT (JSON Web Tokens). The project keeps dependencies minimal, using only .env and jwt libraries.

Quick Start

  1. Clone the repository:
    git clone https://github.com/ledavid/SimpleServer.git
  2. Add a .env file with:
    SECRET_KEY=your_jwt_secret_key
  3. Run the server:
    go run ./cmd/SimpleServer/main.go

Available Routes

  • GET /home - Home route (protected with JWT authorization).
  • POST /login - Login and get a token. The body must provide the next json: {"email": , "password" }
  • GET /refrehs - Refresh your token. The body must provide the last refreshToken in the body

About

A simple httpServer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages