Skip to content

Commit 558764b

Browse files
[WIP] add instructions to README.md (#4)
* add nextjs instructions to README.md * add nuxt integration guide * Apply suggestions from David Co-authored-by: David East <[email protected]> * Nuxt --> Angular * mark nuxt as coming soon * more Angular * remove TODO Co-authored-by: David East <[email protected]>
1 parent 6d62fbc commit 558764b

File tree

1 file changed

+102
-7
lines changed

1 file changed

+102
-7
lines changed

README.md

Lines changed: 102 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@
55
<table>
66
<thead>
77
<tr><td></td><th colspan="3"><sub><sup>Built-in frameworks</sub></sup></th><td></td></tr>
8-
<tr><th></th><th>Next.js</th><th>Angular</th><th>Nuxt</th><th>Custom</th></tr>
8+
<tr>
9+
<th></th>
10+
<th><a href="#deploy-nextjs">Next.js</a></th>
11+
<th><a href="#deploy-angular">Angular</a></th>
12+
<th>Nuxt</th>
13+
<th>Custom</th>
14+
</tr>
915
</thead>
1016
<tbody>
11-
<tr><th>SSR</th><td>✅</td><td>✅</td><td></td><td>👍</td></tr>
12-
<tr><th>SPA</th><td>✅</td><td>✅</td><td></td><td>👍</td></tr>
13-
<tr><th>SSG</th><td>✅</td><td>✅</td><td></td><td>👍</td></tr>
14-
<tr><th>SWR/E</th><td>❌</td><td>❌</td><td></td><td>❌</td></tr>
15-
<tr><th>Auth+SSR</th><td>✅</td><td>✅</td><td>👍</td><td>👍</td></tr>
17+
<tr><th>SSR</th><td>✅</td><td>✅</td><td>🔜</td><td>👍</td></tr>
18+
<tr><th>SPA</th><td>✅</td><td>✅</td><td>🔜</td><td>👍</td></tr>
19+
<tr><th>SSG</th><td>✅</td><td>✅</td><td>🔜</td><td>👍</td></tr>
20+
<tr><th>SWR/E</th><td>❌</td><td>❌</td><td>🔜</td><td>❌</td></tr>
21+
<tr><th>Auth+SSR</th><td>✅</td><td>✅</td><td>🔜</td><td>👍</td></tr>
1622
<tr><th>Status</th><td>🔬</td><td>🔬</td><td>🔬</td><td>🔬</td></tr>
1723
</tbody>
1824
</table>
@@ -23,6 +29,95 @@
2329

2430
This repository is maintained by Googlers but is not a supported Firebase product. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis.
2531

32+
# Deploy Next.js
33+
34+
Easily deploy your Next.js application to Firebase and serve dynamic content to your users.
35+
36+
## What you'll need before you begin
37+
38+
### Prerequisites
39+
- Firebase CLI version 10.9.1 or later (see installation instructions [here](https://firebase.google.com/docs/cli))
40+
- (optional) Billing enabled on your Firebase Project (if you plan to use SSR)
41+
42+
### Initialize Firebase
43+
To get started, you'll need to initialize Firebase for your framework project. Use the Firebase CLI for a new project, or modify `firebase.json` for an existing project.
44+
45+
#### Initialize a new project
46+
47+
Run the initialization command from the CLI:
48+
```shell
49+
firebase init hosting
50+
```
51+
52+
#### Initialize an existing project
53+
54+
Change your hosting config in firebase.json to have a `source` option, rather than a `public` option. For example:
55+
56+
```json
57+
{
58+
"hosting": {
59+
"source": "."
60+
}
61+
}
62+
```
63+
64+
### Serve locally
65+
66+
You can test your integration locally by following these steps:
67+
1. Run `firebase serve` from the terminal. This should build your Next.js app and serve it using the Firebase CLI.
68+
2. Open your web app at the local URL returned by the CLI (usually http://localhost:5000)
69+
70+
### Deploy your app to Firebase Hosting
71+
72+
When you're ready to share your changes with the world, deploy your Next.js app to your live site:
73+
1. Run `firebase deploy` from the terminal.
74+
2. Check your website on: `SITE_ID.web.app` or `PROJECT_ID.web.app` (or your custom domain, if you did setup one)
75+
76+
# Deploy Angular
77+
78+
Easily deploy your Angular application to Firebase and serve dynamic content to your users.
79+
80+
## What you'll need before you begin
81+
82+
### Prerequisites
83+
- Firebase CLI version 10.9.1 or later (see installation instructions [here](https://firebase.google.com/docs/cli))
84+
- (optional) Billing enabled on your Firebase Project (if you plan to use SSR)
85+
86+
### Initialize Firebase
87+
To get started, you'll need to initialize Firebase for your framework project. Use the Firebase CLI for a new project, or modify `firebase.json` for an existing project.
88+
89+
#### Initialize a new project
90+
91+
Run the initialization command from the CLI:
92+
93+
```shell
94+
firebase init hosting
95+
```
96+
97+
#### Initialize an existing project
98+
99+
Change your hosting config in `firebase.json` to have a `source` option, rather than a `public` option. For example:
100+
101+
```json
102+
{
103+
"hosting": {
104+
"source": "."
105+
}
106+
}
107+
```
108+
109+
### Serve locally
110+
111+
You can test your integration locally by following these steps:
112+
1. Run `firebase serve` from the terminal. This should build your Angular app and serve it using the Firebase CLI.
113+
2. Open your web app at the local URL returned by the CLI (usually http://localhost:5000)
114+
115+
### Deploy your app to Firebase Hosting
116+
117+
When you're ready to share your changes with the world, deploy your Angular app to your live site:
118+
1. Run `firebase deploy` from the terminal.
119+
2. Check your website on: `SITE_ID.web.app` or `PROJECT_ID.web.app` (or your custom domain, if you did setup one)
120+
26121
# Contributors
27122

28123
We'd love to accept your patches and contributions to this project. There are
@@ -34,4 +129,4 @@ just a few small guidelines you need to follow. [See CONTRIBUTING](./CONTRIBUTIN
34129
$ cd <YOUR-GIT-CHECKOUT>
35130
$ npm i
36131
$ npm run build
37-
```
132+
```

0 commit comments

Comments
 (0)