aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiyush Dixit <79581397+PiyushDixit96@users.noreply.github.com>2021-05-10 21:11:36 +0530
committerGitHub <noreply@github.com>2021-05-10 21:11:36 +0530
commit36de120456b6f0d176ef882fc59c44a4fedad835 (patch)
tree288cf38c8a124135313334e74e9a335af3505365
parente5d88f8fc1af09c544c33aede735b5e3d58fdecc (diff)
Update index.js
-rw-r--r--index.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/index.js b/index.js
index a01c65a..7d77002 100644
--- a/index.js
+++ b/index.js
@@ -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
+}