-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): Firebase emulators (#721)
- Loading branch information
Showing
109 changed files
with
2,795 additions
and
1,987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: Local | ||
--- | ||
|
||
# Local dev environment | ||
|
||
As explained in the [installation guide](/docs/installation), you can run the _client_ and _server_ apps locally, for development purposes. | ||
But you are still connecting to the remote `feedzback-v2-dev` Firebase project for Authentication and Firestore services. | ||
|
||
The good news is that you can run the entire stack locally, using the [Firebase emulator suite](https://firebase.google.com/docs/emulator-suite)! | ||
|
||
:::note | ||
When using the Firebase emulator, the Google Auth provider is no longer available. | ||
Only the Email/Password provider is enabled. | ||
::: | ||
|
||
## `*:emulators` scripts | ||
|
||
In this execution context, the _client_ and _server_ apps are running in "dev" mode (with hot-reloading). | ||
|
||
Only the Firebase _Auth_ and _Firestore_ emulators are started. The _Hosting_ emulator is not used in this context. | ||
|
||
Here are the NPM scripts for this execution context: | ||
|
||
```json title="/client/package.json" | ||
{ | ||
"scripts": { | ||
"start:emulators": "ng serve -c development-emulators", | ||
"firebase:emulators": "firebase emulators:start --only auth:dev,firestore:dev --import ./firebase-emulators-data", | ||
"server:emulators": "npm --prefix ../server run start:emulators", | ||
|
||
// To launch the stack with a single command: | ||
"emulators": "concurrently \"npm run firebase:emulators\" \"npm run server:emulators\" \"npm run start:emulators\"" | ||
} | ||
} | ||
``` | ||
|
||
## `*:e2e` scripts | ||
|
||
In this execution context, the _client_ and _server_ apps are running in "build" mode (no hot-reloading). | ||
|
||
This time, not only are the Firebase _Auth_ and _Firestore_ emulators started, but so is the _Hosting_ emulator that serves the client application. | ||
|
||
This environment is the closest to the production environment (with the exception of the authentication method) and is therefore ideal for e2e testing. | ||
|
||
```json title="/client/package.json" | ||
{ | ||
"scripts": { | ||
"firebase:e2e": "firebase emulators:start --only auth:dev,firestore:dev,hosting:dev --import ./firebase-emulators-data", | ||
"server:e2e": "npm --prefix ../server run start:e2e", | ||
|
||
// To launch the stack with a single command: | ||
"pree2e": "npm run build:e2e", | ||
"e2e": "concurrently \"npm run firebase:e2e\" \"npm run server:e2e\"" | ||
} | ||
} | ||
``` |
41 changes: 41 additions & 0 deletions
41
docs-source/docs/technical-guides/environments/overview.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: Overview | ||
--- | ||
|
||
# Environments | ||
|
||
There are 3 remote environments: `production`, `staging` and `development`. | ||
|
||
## Auth providers | ||
|
||
In _production_ and _staging_ environments, only **Google Auth** provider is enabled. | ||
|
||
In _development_ environment, both **Google Auth** and **Email/Password** providers are enabled. | ||
This lets you create users on the fly (from the Firebase console) to test easily the sending and receiving of feedZbacks. | ||
|
||
## MailGun | ||
|
||
In _staging_ and _development_ environments, MailGun service sends all emails to a unique recipient. | ||
These emails can be viewed from the following mailing list: | ||
|
||
- https://groups.google.com/a/zenika.com/g/feedzback | ||
|
||
## URLs | ||
|
||
### Production | ||
|
||
- **Client app:** https://feedzback.znk.io | ||
- **Server app:** https://server.feedzback.znk.io | ||
- **Firebase console:** https://console.firebase.google.com/project/feedzback-v2 | ||
|
||
### Staging | ||
|
||
- **Client app:** https://staging.feedzback.znk.io | ||
- **Server app:** https://server.staging.feedzback.znk.io | ||
- **Firebase console:** https://console.firebase.google.com/project/feedzback-v2-staging | ||
|
||
### Development | ||
|
||
- **Client app:** https://dev.feedzback.znk.io | ||
- **Server app:** https://server.dev.feedzback.znk.io | ||
- **Firebase console:** https://console.firebase.google.com/project/feedzback-v2-dev |
2 changes: 1 addition & 1 deletion
2
...s/technical-guides/server/introduction.md → ...e/docs/technical-guides/server/swagger.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Introduction | ||
# Swagger | ||
|
||
Discover the server API via [Swagger dev](https://server.dev.feedzback.znk.io/swagger) or [Swagger staging](https://server.staging.feedzback.znk.io/swagger). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.