Base solution for your next web application
Open Closed

Environtment File Setting #10028


User avatar
0
jur.porras created

Prerequisites

Please answer the following quetions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 8.2
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

Just want to ask if ASpNet Zero has a way for setting up environment variables in a file. For example: A file (example: .env file) which consists of the settings that needed specific to a current environment either production of staging. In this way, we dont have to change setting each time we push to each branches. Example config or setting that could often change during development are database credentials, redis, mailing, etc...

Thanks


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @jur.porras

    For ASP.NET Core version, you can use appsettings.ENV_NAME.json files. For Angular app, you can use angular/src/assets/appconfig.json and angular/src/assets/appconfig.production.json files. More options can be added here as well.