Skip to content

Nura-Programmer/node-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Auth API

A simple authentication API built with Node.js, Express, Prisma, and MySQL/PostgreSQL.
It supports User Registration, Login, and Password Reset (Forgot/Reset flow).

Features

  • User Registration (username, email, password)
  • User Login (username + password)
  • Forgot Password (generate reset token)
  • Reset Password (use token to set new password)
  • Passwords hashed with bcrypt
  • Tested with Jest + Supertest

Tech Stack


Setup & Installation

1 Clone Repo

git clone https://github.com/your-username/node-auth.git
cd node-auth

### 2 Install dependencies
```bash
npm install

### 3 Configure Environment
Create a .env file in project root:
```bash
DATABASE_URL="mysql://user:password@localhost:3306/node_auth"
JWT_SECRET="your_jwt_secret"

### 4 Migrate Database
```bash
npx prisma migrate dev --name init

### 5 Start Server
```bash
npm run dev

## Demo video link
https://drive.google.com/file/d/1Td2CyXhLDBteAIHv1jFW-Bll2yeW_pVG/view?usp=sharing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published