I have a Node.js application which runs fine with the standard node index.js syntax (relative path...)
Then I had the need to run it with the absolute path in node /home/bots/mybot/index.js and it was working great as well.
Now I have the need to add a .env file which is still running great from relative path, but I'm not able to run it from absolute path anymore since it's not reading the .env file! I think it is looking for it in the / path which is not ideal of course.
EDIT: I'm currently using discord.js library which probably is using dotenv or something very similar inside.
Any suggestions?