Skip to content

Latest commit

 

History

History
44 lines (37 loc) · 1.13 KB

README.md

File metadata and controls

44 lines (37 loc) · 1.13 KB

Installation

  • Create a .env file and add the secret keys.
PORT = 
MONGODB_URI = 
SECRET_KEY = 

You can generate the SECRET_KEY from https://www.javainuse.com/jwtgenerator

  • go mod tidy ensures that the go. mod file matches the source code in the module. It adds any missing module requirements necessary to build the current module's packages and dependencies, if there are some not used dependencies go mod tidy will remove those from go.
go mod tidy
air

Workflow

  • POST : http://localhost:5050/user/signup
{
    "first_name" : "",
    "last_name" : "",
    "email" : "",
    "password":""
}
  • POST : http://localhost:5050/user/login
{
    "email":"",
    "password":""
}
  • Get specific user data by ID (Provide the token in request header)

GET : http://localhost:5050/users/<USER_ID>

  • Get all users' data (Provide the token in request header)

GET : http://localhost:5050/users