Commit b01b075
authored
Implement client-side Firebase Cloud Functions locations (#23)
* Implement client-side Firebase Cloud Functions locations
Allows client-side Functions calls to remote functions using a supported
Region (Android & iOS) or Custom Domain (iOS only).
See
https://firebase.google.com/docs/functions/locations#client-side_location_selection_for_callable_functions
Adds a method to FirebaseApp ('functions') to set Region or
CustomDomain.
Example usage: firebase().app().functions("europe-west")
See
https://firebase.google.com/docs/reference/node/firebase.app.App#functions
Example client-side call:
firebase().functions().httpsCallable('functionName')()
calls Cloud Function:
exports functionName = functions.region('europe-west1')...
See
https://firebase.google.com/docs/functions/locations#best_practices_for_changing_region
Supported regions: See
https://firebase.google.com/docs/functions/locations
By default functions run in the "us-central1" region, unless another
region is selected.
Android Functions Emulator: Set 'localhost' host to 10.0.2.2
* Update README.md file with usage instructions
* Update README.md file with usage instructions
* Clenaup README.md text1 parent 53bcff4 commit b01b075
File tree
4 files changed
+147
-8
lines changed- packages/firebase-functions
4 files changed
+147
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
51 | 86 | | |
52 | 87 | | |
53 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
27 | 51 | | |
28 | 52 | | |
29 | 53 | | |
| |||
130 | 154 | | |
131 | 155 | | |
132 | 156 | | |
133 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
134 | 160 | | |
135 | 161 | | |
136 | 162 | | |
137 | 163 | | |
138 | 164 | | |
139 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
140 | 170 | | |
141 | 171 | | |
142 | 172 | | |
| |||
162 | 192 | | |
163 | 193 | | |
164 | 194 | | |
165 | | - | |
| 195 | + | |
166 | 196 | | |
167 | 197 | | |
168 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
26 | 54 | | |
27 | 55 | | |
28 | 56 | | |
| |||
115 | 143 | | |
116 | 144 | | |
117 | 145 | | |
118 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
119 | 155 | | |
120 | 156 | | |
121 | 157 | | |
122 | 158 | | |
123 | 159 | | |
124 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
125 | 169 | | |
126 | 170 | | |
127 | 171 | | |
| |||
178 | 222 | | |
179 | 223 | | |
180 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
0 commit comments