https://github.com/wandri/angular-firebase-deployement
Steps to deploy an angular application in firebase.
https://github.com/wandri/angular-firebase-deployement
angular firebase firebase-hosting
Last synced: about 2 months ago
JSON representation
Steps to deploy an angular application in firebase.
- Host: GitHub
- URL: https://github.com/wandri/angular-firebase-deployement
- Owner: wandri
- License: mit
- Created: 2019-03-06T08:52:58.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-06T11:06:16.000Z (over 7 years ago)
- Last Synced: 2026-04-27T17:31:34.255Z (2 months ago)
- Topics: angular, firebase, firebase-hosting
- Language: TypeScript
- Size: 309 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Steps to deploy an angular application with firebase hosting.
1. Create a google account.
2. Go to the [firebase console](https://console.firebase.google.com).
3. In the firebase console, create a new project.


- Remember the id of the project.
- Specify your region and validate.
5. Install [Nodejs](https://nodejs.org/en/download/)
6. Install angular-cli and firebase-tools.
```
npm install -g @angular/cli firebase-tools
```
7. Create a new angular project.
```
ng new angular-firebase
```
8. Build your application.
In your angular folder, build the application.
```
ng build --aot
```
It will create a `dist` folder with your code *(The folder can be hidden by .gitignore)*.
9. Log in to firebase
```
firebase login
```
10. Initialize your project
```
firebase init
```


- Select hosting in the choice.
- Select your project or 'don't setup a default project'

- To the question 'What do you want to use as your public directory ?', give the path to your `dist/` folder.
- To the question 'Configure as a single-page app (rewrite all urls to /index.html)?', answer 'Yes'.
- To the question 'File angular-firebase/dist/index.html already exists. Overwrite?', answer 'No'.
11. (Optional) default project configuration.
If you answer 'don't setup a default project', in the file `.firebaserc` copy the following code with the id of the project :
```
{
"projects": {
"default":
}
}
```
12. Deploy to firebase
```
firebase deploy
```
The link to the application can be found directly in the terminal or in the firebase console in the hosting menu.

