# Environments

Environments are vital to run the app with different configurations based on the context where the App is running. Usually we should have at least four envs:

* **tom-enviroment**: used by the dev to develop on his local machine. The robots / automations are disabled / payments are sandboxed, mails are sandboxed
* **remote-development**  this env contains the same settings of a developer environment but is hosted in the cloud. This env will hit the development api
* **staging**: This is the env where the client and our QA can run tests, find bugs and test new features. Usualli this endpoint is visible to the client. In this env the automations runs, it sends emails, robots / automation runs, payments are with fake credit card / sandboxed
* **production**: This could be the client production environment where of course everything is set in produciton mode (delete operation / mails / payments) We could also decide to have a clone of the client produciton env to do a rollout in our machine before to go live in the client machines.

## How to deal with those?

Inside an Angular project we have a folder src/environments where we can add a file for every environment that we need to support eg:\
src/environments/environment.production.ts\
src/environments/environment.development.ts\
etc...

These envs are included in the version control (GIT)

There is one that is called src/environments/environment.ts which is your local (for local development) env file and this is not added to GIT, so when you start a project you have to create that.

**IMPORTANT**

To show other devs all the vars that are needed for local (or other) dev please add vars also to dev-evnvironment.example.ts


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bitforce.gitbook.io/the-anatomy-of-an-angular-app/environments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
