You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-98Lines changed: 14 additions & 98 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,125 +40,41 @@ Handle multiple levels of async relational data (and their loading & fallback st
40
40
...
41
41
```
42
42
43
-
44
43
## Quick Start
45
44
46
-
Create a Svelte App and install Firebase.
45
+
Grab the [sveltefire-template](https://github.com/codediodeio/sveltefire-template).
47
46
48
47
```bash
49
-
npx degit sveltejs/template fireapp
50
-
cd fireapp
48
+
npx degit codediodeio/sveltefire-template fireapp
49
+
cd fireapp
51
50
npm install
52
-
53
-
npm install sveltefire firebase
54
-
```
55
-
56
-
57
-
Create a web app from the [Firebase Console](https://console.firebase.google.com/) and grab your project config. Enable **Anonymous Login** and create a **Firestore** database instance in test mode.
58
-
59
-
60
-
Initialize the Firebase app in the `App.svelte` file.
// Import the Firebase Services you want bundled and call initializeApp
67
-
importfirebasefrom"firebase/app";
68
-
import'firebase/firestore';
69
-
import'firebase/auth';
70
-
import'firebase/performance';
71
-
import'firebase/analytics';
72
-
73
-
constfirebaseConfig= {
74
-
apiKey:'api-key',
75
-
authDomain:'project-id.firebaseapp.com',
76
-
databaseURL:'https://project-id.firebaseio.com',
77
-
projectId:'project-id',
78
-
storageBucket:'project-id.appspot.com',
79
-
messagingSenderId:'sender-id',
80
-
appId:'app-id',
81
-
measurementId:'G-measurement-id',
82
-
}
83
-
84
-
firebase.initializeApp(firebaseConfig)
85
-
</script>
86
51
```
87
52
88
-
**Full Example**
89
-
90
-
Start by building an **authenticated realtime CRUD app** . A user can sign-in, create posts, and add comments to that post. Paste this code into your app.
Follow the instructions on the [sveltefire-template](https://github.com/codediodeio/sveltefire-template).
4
+
5
+
## Install from Scratch
6
+
7
+
Create a Svelte App and install Firebase.
8
+
9
+
```bash
10
+
npm install sveltefire firebase
11
+
```
12
+
13
+
Create a web app from the [Firebase Console](https://console.firebase.google.com/) and grab your project config. Enable **Anonymous Login** and create a **Firestore** database instance in test mode.
14
+
15
+
16
+
Initialize the Firebase app in the `App.svelte` file. Make sure to import the Firebase packages you expect to use.
0 commit comments