TheWidlarzGroup / JWTAuthBackend

Express.js app with token-based authentication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend for my article on TheWidlarzGroup

install postgres

How to run?!

  • Step 1: Clone the project
git clone https://github.com/TheWidlarzGroup/JWTAuthBackend.git
  • Step 2: Install packages
cd JWTAuthBackend && yarn
  • Step 3: Add .env file
Add .env file with DATABASE_URL

example:
DATABASE_URL =  "postgresql://postgres:postgres@localhost:5432/prismadb"
REFRESH_TOKEN_SECRET = "refreshthesecretphrog"
ACCESS_TOKEN_SECRET = "accessthesecretphrog"
  • Step 4: Run Prisma migration:
npx prisma migrate dev --name newMigration --preview-feature
  • Step 5: Run the backend!
yarn dev

About

Express.js app with token-based authentication

License:MIT License


Languages

Language:TypeScript 98.5%Language:Shell 1.5%