Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Login API with JWT authentication

Login RESTFul API

MIT License Made by Framework Node

A login RESTFul API that uses Node.js and the Express framework along with JWT for authentication

Features

  • NodeJS
  • Express
  • MongoDB
  • JWT

Requirements

Instalation

  • git clone https://github.com/ThiagoBastosN/LoginRESTFulAPI.git
  • cd loginrestfulapi
  • npm install
  • Inside .env, change DATABASE_URI to your cluster URI
  • npm start
  • You may also want to add .env to .gitignore

Routes

At http://localhost:3000/ you'll have some route options.

GET routes

  • http://localhost:3000
    • /retrieveDb
    • /main
      • Requires authentication header and a token that comes in /login response, the format must be Bearer yourtoken

Notice that /main route requires authentication.

POST routes

  • http://localhost:3000
    • /register
      • Body content: {"username": yourusername, "password": yourpassword}
    • /login
      • Body content: {"username": yourusername, "password": yourpassword}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages