File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
snippets/functions-next/callable Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1
1
// [SNIPPET_REGISTRY disabled]
2
2
// [SNIPPETS_SEPARATION enabled]
3
3
4
+ export function initialize ( ) {
5
+ // [START fb_functions_initialize]
6
+ const { initializeApp } = require ( "firebase/app" ) ;
7
+ const { getFunctions } = require ( "firebase/functions" ) ;
8
+
9
+ initializeApp ( {
10
+ // Your Firebase Web SDK configuration
11
+ // [START_EXCLUDE]
12
+ projectId : "<PROJECT_ID>" ,
13
+ apiKey : "<API_KEY>" ,
14
+ // [END_EXCLUDE]
15
+ } ) ;
16
+
17
+ const functions = getFunctions ( ) ;
18
+ // [END fb_functions_initialize]
19
+ }
20
+
4
21
export function callAddMessage ( ) {
5
22
const messageText = "Hello, World!" ;
6
23
Original file line number Diff line number Diff line change
1
+ // [START fb_functions_imports]
1
2
import firebase from "firebase/app" ;
2
3
import "firebase/functions" ;
4
+ // [END fb_functions_imports]
5
+
6
+ function initialize ( ) {
7
+ // [START fb_functions_initialize]
8
+ firebase . initializeApp ( {
9
+ // Your Firebase Web SDK configuration
10
+ // [START_EXCLUDE]
11
+ projectId : "<PROJECT_ID>" ,
12
+ apiKey : "<API_KEY>" ,
13
+ // [END_EXCLUDE]
14
+ } ) ;
15
+
16
+ const functions = firebase . functions ( ) ;
17
+ // [END fb_functions_initialize]
18
+ }
3
19
4
20
function callAddMessage ( ) {
5
21
const messageText = "Hello, World!" ;
Original file line number Diff line number Diff line change
1
+ // This snippet file was generated by processing the source file:
2
+ // ./functions-next/callable.js
3
+ //
4
+ // To make edits to the snippets in this file, please edit the source
5
+
6
+ // [START fb_functions_initialize_modular]
7
+ import { initializeApp } from "firebase/app" ;
8
+ import { getFunctions } from "firebase/functions" ;
9
+
10
+ initializeApp ( {
11
+ // Your Firebase Web SDK configuration
12
+ // [START_EXCLUDE]
13
+ projectId : "<PROJECT_ID>" ,
14
+ apiKey : "<API_KEY>" ,
15
+ // [END_EXCLUDE]
16
+ } ) ;
17
+
18
+ const functions = getFunctions ( ) ;
19
+ // [END fb_functions_initialize_modular]
You can’t perform that action at this time.
0 commit comments