# Firebase 教學

<https://firebase.google.com/>

現在的firebase跟幾年前不同，目前提供了許多包含email link註冊，google FB oauth, Storage, Cloud function, ML kit等服務。

在小型的專案架構是很不錯的選擇，可以讓前端開發者免去開發後端的步驟。

## 認證

先 clone 此專案：<https://github.com/firebase/quickstart-js/tree/master/auth>

```
1. 註冊firebase帳號與專案
2. 下載firebase cli (可以讓你在cli上直接設定好要使用的專案)
3. 使用 firebase serve 啟動 firebase寫好的 server
4. 最後可使用 firebase deploy 部署
```

## Firestore

現在 firebase 有兩種資料庫版本，以前的 realtime db 跟新的 Firestore

Firestore使用方法可參考：

<https://firebase.google.com/docs/firestore/quickstart#web_1>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://easonwang.gitbook.io/web_advance/firebase-jiao-xue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
