Read the statement by Michael Teeuw here.
Use enviromental variables in server only mode
-
Hey guys!
I need to use enviromental variables
process.envin theconfig.js. However I am unable to do so in the server only mode.The
config.jsis used in the “Webinterface”, this obviously don’t have access to the enviromental variables of Node.js.I am using balena-MagicMirror (made by me) to have multiple remotely managed MagicMirrors which all contain basically the same config, but differ in a few things that should be defined as enviromental variables.
Anyone know how I can “inject” enviromental variables in the browser with some MagicMirror Module?
Edit: I just created a module that will do this
[card:idoodler/MMM-ENV-Provider]
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login