Skip to content

Farnaziifz/todo-list-json-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSONServer TODO List + JWT Auth

expose API using json-server

Install

$ npm install
$ npm run start

How to login/register?

You can login/register by sending a POST request to

POST http://localhost:8000/auth/login
POST http://localhost:8000/auth/register

with the following data

{
  "email": "[email protected]",
  "password":"farnaz"
}

You should receive an access token with the following format

{
   "access_token": "<ACCESS_TOKEN>"
}

You should send this authorization with any request to the protected endpoints

Authorization: Bearer <ACCESS_TOKEN>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published