Skip to content

Commit

Permalink
Added .env.example
Browse files Browse the repository at this point in the history
  • Loading branch information
Floturner committed Nov 22, 2023
1 parent 0e88f17 commit d572990
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
27 changes: 27 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# DB
DATABASE_HOST=localhost
DATABASE_PORT=5432
DATABASE_USER=postgres
DATABASE_PASSWORD=adminer1234
DATABASE_NAME=postgres

# JWT
JWT_SECRET=545e9a3d-051a-4b79-8b2c-eae3c34c8f3a
JWT_TOKEN_AUDIENCE=localhost:3000
JWT_TOKEN_ISSUER=localhost:3000
JWT_ACCESS_TOKEN_TTL=3600
JWT_REFRESH_TOKEN_TTL=86400

# REDIS
REDIS_HOST=localhost
REDIS_PORT=6379

# GOOGLE
GOOGLE_CLIENT_ID=<YOUR_ID_HERE>
GOOGLE_CLIENT_SECRET=<YOUR_SECRET_HERE>

# 2FA
TFA_APP_NAME=auth-playground

# SESSION
SESSION_SECRET=365c4ac7-d5c3-4acb-a4f5-c70c691e321d
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@ This app showcases real-world Authentication and Authorization techniques with N
8. Google authentication
9. Sessions with Passport

## Installation
## Get started

1. Make sure you have docker installed on your local machine.
2. Duplicate the `.env.example` file and rename it to `.env`. Fill in the required variables.

```bash
# Install dependencies
$ npm install
```

## Setup databases

Make sure you have docker installed on your local machine.

```bash
# setup postgres and redis with docker
# setup postgres database with docker
$ docker compose up
```

Expand Down

0 comments on commit d572990

Please sign in to comment.