Skip to content

Commit

Permalink
fix(add env): add environment vars reading
Browse files Browse the repository at this point in the history
Add script in package.json to read environgment vars from .env

fix #49 fix #51
  • Loading branch information
Manny authored and Manny committed Aug 12, 2020
1 parent 91a64fb commit 410960e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: cp .env.example .env
- run: yarn env
- run: yarn test:lint
- run: yarn test:coverage
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"author": "@codingwithmanny",
"license": "MIT",
"scripts": {
"env": "export $(cat .env | sed 's/#.*//g' | xargs)",
"commit": "npx git-cz",
"build": "tsc",
"dev": "ts-node-dev src/server.ts",
Expand All @@ -29,7 +30,6 @@
"dependencies": {
"@prisma/cli": "^2.1.3",
"@prisma/client": "^2.1.3",
"@types/axios": "^0.14.0",
"@types/bcrypt": "^3.0.0",
"@types/cookie-parser": "^1.4.2",
"@types/cors": "^2.8.6",
Expand Down

0 comments on commit 410960e

Please sign in to comment.