summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+}