Added firebase functions
This commit is contained in:
parent
8badbd4e5f
commit
24c057738e
@ -12,5 +12,8 @@
|
||||
"destination": "/index.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"functions": {
|
||||
"predeploy": "npm --prefix \"$RESOURCE_DIR\" run build"
|
||||
}
|
||||
}
|
||||
|
20
functions/package.json
Normal file
20
functions/package.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "functions",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"serve": "npm run build && firebase serve --only functions",
|
||||
"shell": "npm run build && firebase functions:shell",
|
||||
"start": "npm run shell",
|
||||
"deploy": "firebase deploy --only functions",
|
||||
"logs": "firebase functions:log"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"firebase-admin": "~5.12.1",
|
||||
"firebase-functions": "^1.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.5.3"
|
||||
},
|
||||
"private": true
|
||||
}
|
5
functions/src/index.ts
Normal file
5
functions/src/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import * as functions from 'firebase-functions';
|
||||
|
||||
export const helloWorld = functions.https.onRequest((request, response) => {
|
||||
response.send('Hello from Firebase!');
|
||||
});
|
14
functions/tsconfig.json
Normal file
14
functions/tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["es6"],
|
||||
"module": "commonjs",
|
||||
"noImplicitReturns": true,
|
||||
"outDir": "lib",
|
||||
"sourceMap": true,
|
||||
"target": "es6"
|
||||
},
|
||||
"compileOnSave": true,
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
2696
functions/yarn.lock
Normal file
2696
functions/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user