Skip to content

Commit

Permalink
Merge pull request #10 from Marvell-Consulting/SW-183
Browse files Browse the repository at this point in the history
SW-183: move auth to backend and use JWT for frontend auth
  • Loading branch information
wheelsandcogs authored Sep 11, 2024
2 parents 53bd478 + 8bf4db4 commit 68cc4a6
Show file tree
Hide file tree
Showing 28 changed files with 943 additions and 582 deletions.
10 changes: 10 additions & 0 deletions .env-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# connection details for this service
FRONTEND_URL=http://localhost:3000
BACKEND_URL=http://localhost:3001

SESSION_SECRET=
JWT_SECRET=

# rate limiting
RATE_LIMIT_WINDOW_MS=15*60*1000
RATE_LIMIT_MAX_REQ=100
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"rules": {
"prettier/prettier": 2,
"no-console": 0,
"no-process-env": 0
"no-process-env": 0,
"line-comment-position": 0
},
"globals": {
"NodeJS": true
Expand Down
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,9 @@
- Node 20+
- An Instance of the StatsWales backend Service

## To get going
## Configuration

You'll need to define the following environment variables either in to the environment or in to a `.env` file:

```env
BACKEND_SERVER
BACKEND_PROTOCOL
BACKEND_PORT
SESSION_SECRET
GOOGLE_CLIENT_ID
GOOGLE_CLIENT_SECRET
```
Copy the [.env-example](.env-example) file to `.env` and provide the missing values.

To run the app should be as simple as:

Expand Down
Loading

0 comments on commit 68cc4a6

Please sign in to comment.