locked
[Node.js] Get app settings RRS feed

  • Question

  • Hi, 

    What's the new command to get the App settings in Mobile Apps (Node.js)? In Mobile Services I used the following:

    var appSettings = require('mobileservice-config').appSettings;

    Error: Cannot find module 'mobileservice-config'
    I can't find the successor for Mobile Apps. 

    Thanks in advance for your help!

    Kind regards,
    Jeroen


    Wednesday, September 7, 2016 10:30 AM

Answers

  • Finally found it:

    var appSettings = process.env;

    • Marked as answer by jeroen.custers Wednesday, September 7, 2016 11:38 AM
    Wednesday, September 7, 2016 11:37 AM

All replies

  • Finally found it:

    var appSettings = process.env;

    • Marked as answer by jeroen.custers Wednesday, September 7, 2016 11:38 AM
    Wednesday, September 7, 2016 11:37 AM
  • Yep, any settings or connection strings defined in the Azure portal or through environment settings are available on the process.env variable. Many of these are normalized into the mobile app configuration object (exposed through req.azureMobile.configuration), but if you've added any custom settings, use process.env.
    Wednesday, September 7, 2016 5:04 PM