Skip to content

Commit

Permalink
add missing jwt env var
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanBulmer committed Mar 29, 2023
1 parent 38f2621 commit c539f93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Location of environment variable is postfixed to `Config.{location}` (e.g. `Conf
| `KAFKA_BROKERS` | `kafka.brokers` | Kafka server - comma seperated locations of the kafka brokers |
| `KAFKA_CLIENT_ID` | `kafka.clientId` | Kafka server - name of the kafka cluster |
| `KAFKA_CONSUMER_GROUP` | `kafka.consumer.group` | Kafka server - consumer group |
| `JWT_ALGORITHM` | `jwt.algorithm` | JWT - algorithm, default `HS256` |
| `JWT_SECRET` | `jwt.secret` | JWT - secret, key to decode jwt, must be the same across all services in an environment |
| `JWT_ISSUER` | `jwt.issuer` | JWT - issuer, default `codrjs.com` |

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codrjs/config",
"version": "1.0.1",
"version": "1.0.2",
"description": "Codr configuration, unified",
"main": "./cjs/index.js",
"module": "./esm/index.js",
Expand All @@ -22,7 +22,7 @@
"build:esm": "tsc --project tsconfig.esm.json",
"build:cjs": "tsc --project tsconfig.cjs.json",
"build": "yarn clean && yarn build:cjs && yarn build:esm && ./bin/post-build.sh",
"clean": "rm -rf ./dist",
"clean": "rm -rf ./dist/*",
"format": "prettier --write \"src/**/*.(ts|js)\"",
"lint": "eslint -c .eslintrc.json --ignore-path .eslintignore --ext .ts src",
"preversion": "yarn lint",
Expand Down
2 changes: 2 additions & 0 deletions src/config/JWTConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export const JWTConfig: {
algorithm: string;
issuer: string;
secret: string;
} = {
algorithm: process.env.JWT_ALGORITHM as string,
issuer: process.env.JWT_ISSUER as string,
secret: process.env.JWT_SECRET as string,
};

0 comments on commit c539f93

Please sign in to comment.