I have been tried to build a node app with nx workspace, however, the contents of the variable in the .env file cannot be read. I run this node app with this command:
node dist/apps/bot/main.js
I tried to debug the variable. here my code:
import 'dotenv';
import { Telegraf } from 'telegraf';
import { environment } from './environments/environment';
import { App } from './app/app';
const x = process.env.TOKEN;
const bot = new Telegraf(environment.token);
(async () => {
console.debug('Start bot ....');
console.log(x);
const start = await App(bot);
start.launch();
})();
has anyone ever experienced something similar like that? thankyou
