initial commit

This commit is contained in:
mantikoros 2021-12-10 12:10:30 -06:00
parent 0c4243d908
commit 083e5c506b
6 changed files with 68 additions and 0 deletions

5
.firebaserc Normal file
View File

@ -0,0 +1,5 @@
{
"projects": {
"default": "mantic-markets"
}
}

5
firebase.json Normal file
View File

@ -0,0 +1,5 @@
{
"functions": {
"predeploy": "npm --prefix \"$RESOURCE_DIR\" run build"
}
}

13
functions/.gitignore vendored Normal file
View 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
View 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
View 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
View File

@ -0,0 +1,15 @@
{
"compilerOptions": {
"module": "commonjs",
"noImplicitReturns": true,
"noUnusedLocals": true,
"outDir": "lib",
"sourceMap": true,
"strict": true,
"target": "es2017"
},
"compileOnSave": true,
"include": [
"src"
]
}