Skip to content

Commit

Permalink
Added dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
Eghizio committed Sep 16, 2021
1 parent edb6e81 commit 973c567
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PORT=""
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.env
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@types/express": "^4.17.6",
"@types/node": "^13.13.5",
"@types/xml2js": "^0.4.5",
"dotenv": "^10.0.0",
"nodemon": "^1.19.3",
"ts-node": "^8.10.1",
"ts-node-dev": "^1.1.8",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import dotenv from "dotenv";
dotenv.config(); // need to add dev/prod and logger
import { createServer } from "./server";


Expand Down
3 changes: 2 additions & 1 deletion src/middlewares/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export const cache = (ttl: number = 0): RequestHandler => {

next();
};
};
};
// need to disable caching when error, or should i?

0 comments on commit 973c567

Please sign in to comment.