mirror of
https://github.com/hoppscotch/hoppscotch
synced 2024-11-21 14:38:47 +00:00
🔥 Firebase Hosting
This commit is contained in:
parent
fe1034ce1a
commit
c54b019d55
@ -3,6 +3,10 @@ Dockerfile
|
||||
.github
|
||||
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
|
||||
# Firebase
|
||||
.firebase
|
||||
|
||||
### Node template
|
||||
# Logs
|
||||
logs
|
||||
@ -97,4 +101,4 @@ sw.*
|
||||
.postwoman
|
||||
|
||||
# File explorer
|
||||
.directory
|
||||
.directory
|
||||
|
5
.firebaserc
Normal file
5
.firebaserc
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"projects": {
|
||||
"default": "postwoman-api"
|
||||
}
|
||||
}
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,4 +1,8 @@
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
|
||||
# Firebase
|
||||
.firebase
|
||||
|
||||
### Node template
|
||||
# Logs
|
||||
logs
|
||||
@ -93,4 +97,4 @@ sw.*
|
||||
.postwoman
|
||||
|
||||
# File explorer
|
||||
.directory
|
||||
.directory
|
||||
|
12
.travis.yml
12
.travis.yml
@ -27,18 +27,12 @@ branches:
|
||||
- "master"
|
||||
|
||||
install:
|
||||
- "npm install firebase-tools"
|
||||
- "npm install"
|
||||
- "npm run generate"
|
||||
|
||||
notifications:
|
||||
webhooks: https://www.travisbuddy.com
|
||||
|
||||
deploy:
|
||||
provider: pages
|
||||
skip-cleanup: true
|
||||
# Refer to: https://docs.travis-ci.com/user/deployment/pages/#Setting-the-GitHub-token
|
||||
github-token: $GITHUB_ACCESS_TOKEN
|
||||
target-branch: gh-pages
|
||||
local-dir: dist
|
||||
on:
|
||||
branch: master
|
||||
after_success:
|
||||
- firebase deploy --token $FIREBASE_TOKEN
|
||||
|
7
database.rules.json
Normal file
7
database.rules.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
/* Visit https://firebase.google.com/docs/database/security to learn more about security rules. */
|
||||
"rules": {
|
||||
".read": false,
|
||||
".write": false
|
||||
}
|
||||
}
|
21
firebase.json
Normal file
21
firebase.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"database": {
|
||||
"rules": "database.rules.json"
|
||||
},
|
||||
"firestore": {
|
||||
"rules": "firestore.rules",
|
||||
"indexes": "firestore.indexes.json"
|
||||
},
|
||||
"hosting": {
|
||||
"public": "dist",
|
||||
"cleanUrls": true,
|
||||
"ignore": [
|
||||
"firebase.json",
|
||||
"**/.*",
|
||||
"**/node_modules/**"
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"rules": "storage.rules"
|
||||
}
|
||||
}
|
26
firestore.indexes.json
Normal file
26
firestore.indexes.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
// Example:
|
||||
//
|
||||
// "indexes": [
|
||||
// {
|
||||
// "collectionGroup": "widgets",
|
||||
// "queryScope": "COLLECTION",
|
||||
// "fields": [
|
||||
// { "fieldPath": "foo", "arrayConfig": "CONTAINS" },
|
||||
// { "fieldPath": "bar", "mode": "DESCENDING" }
|
||||
// ]
|
||||
// },
|
||||
//
|
||||
// "fieldOverrides": [
|
||||
// {
|
||||
// "collectionGroup": "widgets",
|
||||
// "fieldPath": "baz",
|
||||
// "indexes": [
|
||||
// { "order": "ASCENDING", "queryScope": "COLLECTION" }
|
||||
// ]
|
||||
// },
|
||||
// ]
|
||||
// ]
|
||||
"indexes": [],
|
||||
"fieldOverrides": []
|
||||
}
|
7
firestore.rules
Normal file
7
firestore.rules
Normal file
@ -0,0 +1,7 @@
|
||||
service cloud.firestore {
|
||||
match /databases/{database}/documents {
|
||||
match /{document=**} {
|
||||
allow read, write;
|
||||
}
|
||||
}
|
||||
}
|
1
functions/.gitignore
vendored
Normal file
1
functions/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
node_modules/
|
8
functions/index.js
Normal file
8
functions/index.js
Normal file
@ -0,0 +1,8 @@
|
||||
const functions = require('firebase-functions');
|
||||
|
||||
// // Create and Deploy Your First Cloud Functions
|
||||
// // https://firebase.google.com/docs/functions/write-firebase-functions
|
||||
//
|
||||
// exports.helloWorld = functions.https.onRequest((request, response) => {
|
||||
// response.send("Hello from Firebase!");
|
||||
// });
|
1915
functions/package-lock.json
generated
Normal file
1915
functions/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
22
functions/package.json
Normal file
22
functions/package.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "functions",
|
||||
"description": "Cloud Functions for Firebase",
|
||||
"scripts": {
|
||||
"serve": "firebase serve --only functions",
|
||||
"shell": "firebase functions:shell",
|
||||
"start": "npm run shell",
|
||||
"deploy": "firebase deploy --only functions",
|
||||
"logs": "firebase functions:log"
|
||||
},
|
||||
"engines": {
|
||||
"node": "8"
|
||||
},
|
||||
"dependencies": {
|
||||
"firebase-admin": "^8.0.0",
|
||||
"firebase-functions": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"firebase-functions-test": "^0.1.6"
|
||||
},
|
||||
"private": true
|
||||
}
|
7
storage.rules
Normal file
7
storage.rules
Normal file
@ -0,0 +1,7 @@
|
||||
service firebase.storage {
|
||||
match /b/{bucket}/o {
|
||||
match /{allPaths=**} {
|
||||
allow read, write: if request.auth!=null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user