You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,9 @@
2
2
3
3
## Getting Started
4
4
5
-
To begin you will need `nodejs` and `firebase-tools`
5
+
This documentation describes features of the `firebase-framework` but generally does not cover firebase options in general. For example, to find out how you can specify a specific version of nodejs see the firebase docs here: https://firebase.google.com/docs/functions/manage-functions#set_nodejs_version
6
6
7
-
nodejs v8.15.x is recommended because cloud functions by default uses node 8. \
8
-
While it is not the most recent LTS build it can be downloaded here:
9
-
<https://nodejs.org/download/release/v8.15.1/>
7
+
To begin you will need `nodejs` and `firebase-tools`
10
8
11
9
To install `firebase-tools` run
12
10
@@ -119,7 +117,7 @@ module.exports = [hello];
119
117
| events | false | Array | pub sub events that the service will listed to (see events below) |
120
118
| schedule | false | Array | cloud schedules that will trigger functions within this service (see schedule below) |
121
119
| keepAlive | false | boolean | whether a scheduled function should be set up that will trigger the http function (routes) every 5 minutes to prevent cold starts\*|
122
-
| runtimeOptions | false | object |An object containing 3 optional properties. `memory`: amount of memory to allocate to the function, possible values are: '128MB', '256MB', '512MB', '1GB', and '2GB'. `timeoutSeconds`: timeout for the function in seconds, possible values are 0 to 540. `failurePolicy`: When `true`, the function should be retried on failure. default: `false`. |
120
+
| runtimeOptions | false | object |Firebase runtime options usually passed to `runWith` as documented here: https://firebase.google.com/docs/reference/functions/function_configuration.runtimeoptions|
123
121
| maxAge | undefined | number | The maxAge in ms before the event listener will not attempt to process an event. Can be used to prevent infinite retries of a retry-able event |
124
122
125
123
\* Though billing is required, you can expect the overall cost to be manageable, as each Cloud Scheduler job costs \$0.10 (USD) per month, and there is an allowance of three free jobs per Google account (as of the time of writing). \* The keepAlive feature adds a route to the service at '/heartbeat'. This will not conflict with wildcard routes in the service but would conflict with a route named the same.
@@ -143,7 +141,7 @@ module.exports = [hello];
143
141
| type | false | string | the event type to listen to. This is passed to the subscriber but will not affect which message in the topic trigger the subscriber, it can function as a not about which types of events from the topic the function cares about |
144
142
| function | false | function | to be executed when the described event is triggered |
145
143
| ensureIdempotent | false | boolean | whether the framework should check messages against a store (requires a firestore database in the project) to ensure that messages are never processed more than once |
146
-
| runtimeOptions | false | object |An object containing 2 optional properties. `memory`: amount of memory to allocate to the function, possible values are: '128MB', '256MB', '512MB', '1GB', and '2GB'. `timeoutSeconds`: timeout for the function in seconds, possible values are 0 to 540.|
144
+
| runtimeOptions | false | object |Firebase runtime options usually passed to `runWith` as documented here: https://firebase.google.com/docs/reference/functions/function_configuration.runtimeoptions|
147
145
148
146
#### Schedule
149
147
@@ -152,7 +150,7 @@ module.exports = [hello];
152
150
| name | true | string | The name of the schedule (it can be anything) |
153
151
| time | true | string | Both Unix Crontab and AppEngine syntax are supported by Google Cloud Scheduler. |
154
152
| function | false | function | to be executed when the cronjob is run |
155
-
| runtimeOptions | false | object |An object containing 2 optional properties. `memory`: amount of memory to allocate to the function, possible values are: '128MB', '256MB', '512MB', '1GB', and '2GB'. `timeoutSeconds`: timeout for the function in seconds, possible values are 0 to 540.|
153
+
| runtimeOptions | false | object |Firebase runtime options usually passed to `runWith` as documented here: https://firebase.google.com/docs/reference/functions/function_configuration.runtimeoptions|
0 commit comments