← Previous | ↑ | Next → |
---|---|---|
Testing | Go to index | - |
Once you have an initial implementation of your app, it's important to get it out into the world and into the hands of your users. And to keep an eye on performance, usage and any issues that might arise.
The base template is set up to be easily deployed to a Firebase project (that you set up), using the ./deploy
script (designed to be run locally). You can read more about this in the base template's ARCHITECTURE document.
It's important to deploy your app as early as possible, even if it's not fully complete. This is so you can catch any potential issues (e.g. missing indexes) early on.
Then, it's good to get into the habit of deploying often, whenever you get to a stable state locally.
Important
The base template is set up to run things locally and then deploy to a "live" environment — the one your users will use. You may be used to projects where there's at least one more environment in between (e.g. a "staging" environment).
This will depend on how much risk you can take — if you don't have many users, you can probably deploy (and potentially break things) often to a live environment, as long as you address the issues soon. If you have a lot of users — especially ones where breakages are a bigger deal — you'll want to be more cautious, with an intermediate staging environment where you test out all changes first, before deploying live. Also in this case, having more comprehensive automated testing and monitoring in place is important.
Firebase has a useful set of tools which you can access from the Firebase console (via the "Usage" tab of each service's section), for monitoring purposes:
- For authentication, you can view usage like daily and monthly active users, etc.
- For Firestore, you can view usage like read and write operations, etc.
- For Realtime Database, you can view usage like connections, storage, etc.
- For storage, you can view usage like bandwidth and storage, etc
- For hosting, you can view usage like bandwidth and storage, etc.
- For functions, you can view usage like invocations, etc., as well as logs for the individual functions.
Note that for detailed logs and monitoring you'll often find links to the Google Cloud Console (from these usage sections), where the more elaborate tools are.
Important
Since Firebase is a pay-as-you-go service, it's important to keep an eye on your usage and costs. You can set up budget alerts in the Firebase console to notify you when you're approaching certain thresholds.
Tip
To help debug slow queries in Firestore, a new "query explain" feature has been released (currently under preview).
← Previous | ↑ | Next → |
---|---|---|
Testing | Go to index | - |