forked from firebase/quickstart-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
2,435 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# FriendlyEats (Web) | ||
|
||
## Introduction | ||
|
||
Fire Eats is a restaurant recommendation app built on Cloud Firestore. | ||
For more information about Firestore visit [the docs][firestore-docs]. | ||
|
||
[firestore-docs]: https://firebase.google.com/docs/firestore/ | ||
|
||
## Setup | ||
|
||
Install the Firebase CLI: | ||
|
||
``` | ||
npm -g i firebase-tools | ||
``` | ||
|
||
Then run a local server: | ||
|
||
``` | ||
firebase serve --project YOUR_PROJECT_ID | ||
``` | ||
|
||
You will also need to enable Anonymous Authentication in your Firebase Console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
importScripts('/__/firebase/3.8.0/firebase-app.js'); | ||
importScripts('/__/firebase/3.8.0/firebase-messaging.js'); | ||
importScripts('/__/firebase/init.js'); | ||
|
||
firebase.messaging(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"hosting": { | ||
"public": "./", | ||
"ignore": [ | ||
"firebase.json", | ||
"database-rules.json", | ||
"storage.rules", | ||
"functions" | ||
], | ||
"headers": [ | ||
{ | ||
"source": "**/*.@(js|html)", | ||
"headers": [ | ||
{ | ||
"key": "Cache-Control", | ||
"value": "max-age=0" | ||
} | ||
] | ||
} | ||
], | ||
"rewrites": [ | ||
{ | ||
"source": "**", | ||
"destination": "/index.html" | ||
} | ||
] | ||
}, | ||
"firestore": { | ||
"rules": "firestore.rules", | ||
"indexes": "firestore.indexes.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"indexes": [ | ||
{ | ||
"collectionId": "restaurants", | ||
"fields": [ | ||
{ "fieldPath": "city", "mode": "ASCENDING" }, | ||
{ "fieldPath": "avgRating", "mode": "DESCENDING" } | ||
] | ||
}, | ||
{ | ||
"collectionId": "restaurants", | ||
"fields": [ | ||
{ "fieldPath": "category", "mode": "ASCENDING" }, | ||
{ "fieldPath": "avgRating", "mode": "DESCENDING" } | ||
] | ||
}, | ||
{ | ||
"collectionId": "restaurants", | ||
"fields": [ | ||
{ "fieldPath": "price", "mode": "ASCENDING" }, | ||
{ "fieldPath": "avgRating", "mode": "DESCENDING" } | ||
] | ||
}, | ||
{ | ||
"collectionId": "restaurants", | ||
"fields": [ | ||
{ "fieldPath": "city", "mode": "ASCENDING" }, | ||
{ "fieldPath": "numRatings", "mode": "DESCENDING" } | ||
] | ||
}, | ||
{ | ||
"collectionId": "restaurants", | ||
"fields": [ | ||
{ "fieldPath": "category", "mode": "ASCENDING" }, | ||
{ "fieldPath": "numRatings", "mode": "DESCENDING" } | ||
] | ||
}, | ||
{ | ||
"collectionId": "restaurants", | ||
"fields": [ | ||
{ "fieldPath": "price", "mode": "ASCENDING" }, | ||
{ "fieldPath": "numRatings", "mode": "DESCENDING" } | ||
] | ||
}, | ||
{ | ||
"collectionId": "restaurants", | ||
"fields": [ | ||
{ "fieldPath": "city", "mode": "ASCENDING" }, | ||
{ "fieldPath": "price", "mode": "ASCENDING" } | ||
] | ||
}, | ||
{ | ||
"collectionId": "restaurants", | ||
"fields": [ | ||
{ "fieldPath": "category", "mode": "ASCENDING" }, | ||
{ "fieldPath": "price", "mode": "ASCENDING" } | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
service cloud.firestore { | ||
match /databases/{database}/documents { | ||
match /{document=**} { | ||
allow read, write if auth != null; | ||
} | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.