Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (36 sloc) 1.77 KB
title authors intro types categories published updated
Launch.json and node application settings
The launch.json file is a great way to add application settings to a node application when you are debugging locally
2017/07/26 14:00:00
2017/07/26 14:00:00

When hosting a node application in Azure I will often set application settings and keys in the portal using the application settings UI.

In my app I retrieve a variables using the env object e.g.


It's then a question on how to add these application settings to your app when debugging locally. My current favourite way to do this is to use the

file in VS Code. You can configure your debugging experience in many ways using this file and easily add env settings as you can see below:

    "version": "0.2.0",
    "configurations": [
            "type": "node",
            "request": "launch",
            "name": "Beebs Bot",
            "program": "${workspaceRoot}/src/app.js",
            "env": {
                "NODE_ENV": "development",
                "MICROSOFT_APP_ID": "obs-fake-3543-543-4353",
                "MICROSOFT_APP_PASSWORD": "6765jjhjh",
                "KNOWLEDGE_BASE_ID": "665756-78678-876867-76876",
                "KNOWLEDGE_BASE_SUBSCRIPTION_KEY": "fake2342342342",
                "LUIS_MODEL_URL": ""