Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Accessing environmental variables

$
0
0

Is it possible to access .NET core environment variables from my gulpfile? Ultimately what I want to do is run a gulp task that checks for Development or Production and copies a different json file into wwwroot based on that. I found this code snippet for .NET and I was wondering if there is anything like it in .NET Core

function isForDevelopment() {

        var env = process.env.ASPNET_ENV|| "Development";

        return env ==="Development";

}

Thanks!


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>