Skip to content

Commit

Permalink
firebase init
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Esplin committed May 3, 2018
1 parent f6b489e commit 7e5ea41
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
@@ -0,0 +1,5 @@
{
"projects": {
"default": "firelist-react"
}
}
6 changes: 6 additions & 0 deletions database.rules.json
@@ -0,0 +1,6 @@
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
26 changes: 26 additions & 0 deletions firebase.json
@@ -0,0 +1,26 @@
{
"database": {
"rules": "database.rules.json"
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"storage": {
"rules": "storage.rules"
}
}
14 changes: 14 additions & 0 deletions firestore.indexes.json
@@ -0,0 +1,14 @@
{
// Example:
//
// "indexes": [
// {
// "collectionId": "widgets",
// "fields": [
// { "fieldPath": "foo", "mode": "ASCENDING" },
// { "fieldPath": "bar", "mode": "DESCENDING" }
// ]
// }
// ]
"indexes": []
}
7 changes: 7 additions & 0 deletions firestore.rules
@@ -0,0 +1,7 @@
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write;
}
}
}
8 changes: 8 additions & 0 deletions functions/index.js
@@ -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!");
// });
16 changes: 16 additions & 0 deletions functions/package.json
@@ -0,0 +1,16 @@
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase serve --only functions",
"shell": "firebase experimental:functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"dependencies": {
"firebase-admin": "~5.8.1",
"firebase-functions": "^0.8.1"
},
"private": true
}
7 changes: 7 additions & 0 deletions storage.rules
@@ -0,0 +1,7 @@
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write: if request.auth!=null;
}
}
}

0 comments on commit 7e5ea41

Please sign in to comment.