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: examples/with-firebase-hosting/README.md
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,16 @@ It is recommended to use a package manager that uses a lockfile and caching for
15
15
-[pnpm](https://github.com/pnpm/pnpm)
16
16
17
17
Set up firebase:
18
+
- install Firebase Tools: `npm i -g firebase-tools`
18
19
- create a project through the [firebase web console](https://console.firebase.google.com/)
19
20
- grab the projects ID from the web consoles URL: https://console.firebase.google.com/project/<projectId>
20
21
- update the `.firebaserc` default project ID to the newly created project
21
22
22
23
Install project:
23
24
24
-
Each of the other commands pre-installs all dependencies
25
+
```bash
26
+
npm install
27
+
```
25
28
26
29
Run Next.js development:
27
30
@@ -35,7 +38,7 @@ Run Firebase locally for testing:
35
38
npm run serve
36
39
```
37
40
38
-
Deploy it to the cloud with Firebase
41
+
Deploy it to the cloud with Firebase:
39
42
40
43
```bash
41
44
npm run deploy
@@ -46,7 +49,7 @@ The goal is to host the Next.js app on Firebase Cloud Functions with Firebase Ho
46
49
47
50
This is based off of the work at https://github.com/geovanisouza92/serverless-firebase & https://github.com/jthegedus/firebase-functions-next-example as described [here](https://medium.com/@jthegedus/next-js-on-cloud-functions-for-firebase-with-firebase-hosting-7911465298f2).
48
51
49
-
## Important & Caveats
52
+
## Important / Caveats
50
53
* The empty `placeholder.html` file is so Firebase Hosting does not error on an empty `public/` folder and still hosts at the Firebase project URL.
51
54
*`firebase.json` outlines the catchall rewrite rule for our Cloud Function.
52
55
* Testing on Firebase locally requires a complete build of the Next.js app. `npm run serve` handles everything required.
0 commit comments