Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thewidlarzgroup/jwtauthbackend
Express.js app with token-based authentication
https://github.com/thewidlarzgroup/jwtauthbackend
authentication expressjs nextjs nodejs token-based-authentication
Last synced: 3 months ago
JSON representation
Express.js app with token-based authentication
- Host: GitHub
- URL: https://github.com/thewidlarzgroup/jwtauthbackend
- Owner: TheWidlarzGroup
- License: mit
- Created: 2021-01-28T19:05:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-29T17:31:56.000Z (over 3 years ago)
- Last Synced: 2023-03-03T21:03:48.674Z (almost 2 years ago)
- Topics: authentication, expressjs, nextjs, nodejs, token-based-authentication
- Language: TypeScript
- Homepage:
- Size: 59.6 KB
- Stars: 19
- Watchers: 2
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backend for my article on [TheWidlarzGroup](https://www.thewidlarzgroup.com/)
[install postgres](https://www.postgresqltutorial.com/install-postgresql/)
### How to run?!
- Step 1: Clone the project
```bash
git clone https://github.com/TheWidlarzGroup/JWTAuthBackend.git
```- Step 2: Install packages
```bash
cd JWTAuthBackend && yarn
```- Step 3: Add .env file
```
Add .env file with DATABASE_URLexample:
DATABASE_URL = "postgresql://postgres:postgres@localhost:5432/prismadb"
REFRESH_TOKEN_SECRET = "refreshthesecretphrog"
ACCESS_TOKEN_SECRET = "accessthesecretphrog"
```- Step 4: Run Prisma migration:
```bash
npx prisma migrate dev --name newMigration --preview-feature
```- Step 5: Run the backend!
```bash
yarn dev
```