-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(examples): update firebase example to use
.env
- Loading branch information
1 parent
dd09293
commit 7c1ef77
Showing
4 changed files
with
47 additions
and
7 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,14 @@ | ||
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
# Firebase Config. | ||
# | ||
# 1. Create firestore database. | ||
# 2. Set the `firebaseConfig` variable. | ||
# | ||
# @see https://firebase.google.com/docs/firestore/quickstart#create | ||
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
VITE_FIREBASE_API_KEY= | ||
VITE_FIREBASE_AUTH_DOMAIN= | ||
VITE_FIREBASE_PROJECT_ID= | ||
VITE_FIREBASE_STORAGE_BUCKET= | ||
VITE_FIREBASE_MESSAGING_SENDER_ID= | ||
VITE_FIREBASE_APP_ID= |
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 |
---|---|---|
@@ -1,6 +1,24 @@ | ||
# Example | ||
|
||
``` | ||
npm install --ignore-scripts | ||
npm run dev | ||
``` | ||
1. Create firestore database as per [docs](https://firebase.google.com/docs/firestore/quickstart#create). | ||
1. Set environment variables: | ||
|
||
```sh | ||
# Copy the template .env file to local .env file | ||
cp .env .env.local | ||
# Edit .env.local with firebase config. | ||
``` | ||
|
||
1. Install dependencies (ideally in project root): | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
> If you are running the command directly in the `examples/firebase` directory, use ` --ignore-scripts`. | ||
1. Run local dev server: | ||
|
||
```sh | ||
npm run dev | ||
``` |
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
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