File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 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/ ) .
You can’t perform that action at this time.
0 commit comments