Does /etc/hostname get changed every time Glitch App comes online after sleep?

I need to rely on server name in /etc/hostname for some of my projects.
So, does that stays same even when Glitch Node.js App comes online from sleep mode?

For instance, I am using require("os").hostname() to check whether I am on Glitch or my production server.

I checked and it is changed. :sob:

1 Like

check whether I am on Glitch or my production server.

You can use environment variables to check that.

For instance, it is popular to use NODE_ENV variable to determine project build atate.

1 Like

Good suggestion my friend.
Thanks a lot.