diff options
-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 +}
|