Skip to content

Commit 04b4581

Browse files
goldblattdavideast
authored andcommitted
Create 7-deploying-angularfire-to-firebase.md
1 parent a919bdb commit 04b4581

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# 7. Deploy AngularFire2 to Firebase
2+
3+
### 0. Build your Angular project for prod
4+
5+
Before you can deploy your angular project, you need to build a version with your prod environment variables.
6+
Make sure to add your production firebase configuraiton to the src/environments/environment.prod.ts before you build.
7+
8+
```bash
9+
# build the angular project, creates a dist folder in your directory
10+
ng build -prod
11+
```
12+
13+
### 1. Run Firebase init
14+
15+
You must initliazie firebase hosting in order to deploy your application. In order to this run the `firebase init` command.
16+
This command prompts you to give the public directory. Choose the /dist directory created by the `ng build -prod`.
17+
`firebase init` will also ask you if you want to overwrite your index file. Type `no` since your angular app includes a index file.
18+
19+
### 2. Deploy your Project
20+
21+
To deploy your app, simply run `firebase deploy`!
22+
23+
For more information on Firebase `init` and `deploy` commands, checkout the [Firebase CLI documentation](https://firebase.google.com/docs/cli/).

0 commit comments

Comments
 (0)