Browse Source

dotenv flow fix

tsMigration
Nareshkumar Rao 3 years ago
parent
commit
99a7e994ca
  1. 13
      package-lock.json
  2. 1
      package.json
  3. 10
      src/app.ts

13
package-lock.json

@ -24,6 +24,7 @@
"@tsconfig/node14": "^1.0.1",
"@types/bcrypt": "^5.0.0",
"@types/cors": "^2.8.12",
"@types/dotenv-flow": "^3.1.1",
"@types/express": "^4.17.13",
"@types/express-session": "^1.17.4",
"@types/qrcode": "^1.4.1",
@ -264,6 +265,12 @@
"integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==",
"dev": true
},
"node_modules/@types/dotenv-flow": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@types/dotenv-flow/-/dotenv-flow-3.1.1.tgz",
"integrity": "sha512-khxgP+KkHPL72SP0Wqn1gB6EHj6yk79OBGJEKW64XL13RbyDGTkRbbA47VICOLRrvgKOpZeun2uMsgO7pAsExQ==",
"dev": true
},
"node_modules/@types/express": {
"version": "4.17.13",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
@ -4755,6 +4762,12 @@
"integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==",
"dev": true
},
"@types/dotenv-flow": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@types/dotenv-flow/-/dotenv-flow-3.1.1.tgz",
"integrity": "sha512-khxgP+KkHPL72SP0Wqn1gB6EHj6yk79OBGJEKW64XL13RbyDGTkRbbA47VICOLRrvgKOpZeun2uMsgO7pAsExQ==",
"dev": true
},
"@types/express": {
"version": "4.17.13",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",

1
package.json

@ -26,6 +26,7 @@
"@tsconfig/node14": "^1.0.1",
"@types/bcrypt": "^5.0.0",
"@types/cors": "^2.8.12",
"@types/dotenv-flow": "^3.1.1",
"@types/express": "^4.17.13",
"@types/express-session": "^1.17.4",
"@types/qrcode": "^1.4.1",

10
src/app.ts

@ -1,12 +1,14 @@
import express = require("express");
import session = require("express-session");
import cors = require("cors");
import * as dotenvFlow from "dotenv-flow";
dotenvFlow.config();
import express from "express";
import session from "express-session";
import cors from "cors";
import { corsOpts, sessionOpts } from "./session";
import { TelegramWebhookRoute } from "./routes/TelegramWebhookRoute";
import { LoginRoute } from "./routes/LoginRoute";
import { CodeRoute } from "./routes/CodeRoute";
import { VerifyRoute } from "./routes/VerifyRoute";
require("dotenv-flow").config();
console.log(`Node Environment: ${process.env.NODE_ENV}`);

Loading…
Cancel
Save