diff options
author | Piyush Dixit <79581397+PiyushDixit96@users.noreply.github.com> | 2021-05-10 21:11:36 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 21:11:36 +0530 |
commit | 36de120456b6f0d176ef882fc59c44a4fedad835 (patch) | |
tree | 288cf38c8a124135313334e74e9a335af3505365 | |
parent | e5d88f8fc1af09c544c33aede735b5e3d58fdecc (diff) |
Update index.js
-rw-r--r-- | index.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -6,10 +6,15 @@ const token = process.env['TELEGRAM_TOKEN']; const chat_id = process.env['TELEGRAM_CHAT_ID'];
const api_key = process.env['BINANCE_API_KEY'];
const secret_key = process.env['BINANCE_SECRET_KEY'];
-const NODE_ENV = process.env['NODE_ENV'];
+const NODE_ENV = process.env.NODE_ENV || "development";
const port = process.env.PORT || 3000;
const timeZone = process.env.TIME_ZONE_STRING || 'Asia/Kolkata';
+if (process.env.NODE_ENV === "development") {
+ console.log("NODE_ENV development")
+} else {
+ console.log("NODE_ENV production")
+}
//Indian time string
const event = new Date().toLocaleString('en-IN', { timeZone: timeZone, timeZoneName: 'short' });
@@ -95,4 +100,4 @@ function toTelegram(text) { console.error(message)
}
});
-}
\ No newline at end of file +}
|