> For the complete documentation index, see [llms.txt](https://textav.gitbook.io/firebase-react-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://textav.gitbook.io/firebase-react-notes/react-+-firebase/firebase-create-react-app-setup/switching-environments.md).

# Switching Environments

When you are ready to deploy to production all it takes is an environment switch.

```bash
firebase use production; # switches all future firebase commands to production
firebase deploy
```

Or use the -P flag

```bash
firebase -P ${REACT_APP}-production deploy; # Does not switch default environment but still deploys to production
```
