Skip to content

csalazar94/prisma-auth-express-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adding Authentication to Your Prisma-Integrated Express Application

Secure your Express app with rock-solid authentication! Learn to use password hashing and JWTs for user authentication.

Installation

You can follow this tutorial and understand how this project work on this medium link.

npm install

Usage

npm start

API Endpoints

POST /users

Create a new user.

Request Body

{
  "name": "John Doe",
  "email": "johndoe@example.com",
  "password": "password123"
}

Response Body

{
  "id": 1,
  "name": "John Doe",
  "email": "johndoe@example.com"
}

GET /users

Get a list of all users.

Response Body

[
  {
    "id": 1,
    "name": "John Doe",
    "email": "johndoe@example.com"
  },
  {
    "id": 2,
    "name": "Jane Smith",
    "email": "janesmith@example.com"
  }
]

GET /users/:id

Get one user by id.

Response Body

{
    "id": 1,
    "name": "John Doe",
    "email": "johndoe@example.com"
}

About

Secure your Express app with rock-solid authentication! Learn to use password hashing and JWTs for user authentication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published