• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Use enviromental variables in server only mode

Scheduled Pinned Locked Moved General Discussion
1 Posts 1 Posters 401 Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    idoodler Module Developer
    last edited by idoodler Jul 22, 2019, 11:35 PM Jul 21, 2019, 1:03 PM

    Hey guys!

    I need to use enviromental variables process.env in the config.js. However I am unable to do so in the server only mode.

    The config.js is 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]

    1 Reply Last reply Reply Quote 0
    • 1 / 1
    1 / 1
    • First post
      1/1
      Last post
    Enjoying MagicMirror? Please consider a donation!
    MagicMirror created by Michael Teeuw.
    Forum managed by Sam, technical setup by Karsten.
    This forum is using NodeBB as its core | Contributors
    Contact | Privacy Policy