initial commit
This commit is contained in:
parent
0c4243d908
commit
083e5c506b
5
.firebaserc
Normal file
5
.firebaserc
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"projects": {
|
||||
"default": "mantic-markets"
|
||||
}
|
||||
}
|
5
firebase.json
Normal file
5
firebase.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"functions": {
|
||||
"predeploy": "npm --prefix \"$RESOURCE_DIR\" run build"
|
||||
}
|
||||
}
|
13
functions/.gitignore
vendored
Normal file
13
functions/.gitignore
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Compiled JavaScript files
|
||||
lib/**/*.js
|
||||
lib/**/*.js.map
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Node.js dependency directory
|
||||
node_modules/
|
||||
|
||||
package-lock.json
|
||||
ui-debug.log
|
||||
firebase-debug.log
|
24
functions/package.json
Normal file
24
functions/package.json
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "functions",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"serve": "npm run build && firebase emulators:start --only functions",
|
||||
"shell": "npm run build && firebase functions:shell",
|
||||
"start": "npm run shell",
|
||||
"deploy": "firebase deploy --only functions",
|
||||
"logs": "firebase functions:log"
|
||||
},
|
||||
"engines": {
|
||||
"node": "14"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"dependencies": {
|
||||
"firebase-admin": "9.8.0",
|
||||
"firebase-functions": "3.14.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"firebase-functions-test": "0.2.0",
|
||||
"typescript": "3.8.0"
|
||||
},
|
||||
"private": true
|
||||
}
|
6
functions/src/index.ts
Normal file
6
functions/src/index.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import * as functions from "firebase-functions"
|
||||
|
||||
export const helloWorld = functions.https.onRequest((request, response) => {
|
||||
functions.logger.info("Hello logs!", { structuredData: true })
|
||||
response.send("Hello from Firebase!")
|
||||
})
|
15
functions/tsconfig.json
Normal file
15
functions/tsconfig.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"noImplicitReturns": true,
|
||||
"noUnusedLocals": true,
|
||||
"outDir": "lib",
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"target": "es2017"
|
||||
},
|
||||
"compileOnSave": true,
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user