firebase host 2:log in , init, deploy
After installing firebase CLI tool(I believe they will come out with better GUI version)
I refer to this doc:
https://medium.com/@aleemuddin13/how-to-host-static-website-on-firebase-hosting-for-free-9de8917bebf2
you first create a dir where you store your project(I already created a firebase project),
cd into your dir, and start with:
firebase login
it will show up a google login web page, and you can log in with it.
![](https://cdn-images-1.medium.com/max/1200/1*2PVw1_GwbqycMYXjlBMX-A.png)
then, continue with:
firebase init
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsIIjwfSReMPHt0YGk635Latg9FwX6Gsf6t78YqF-efiM6nRHZIi0tQKRqjuQGmAVJEj3m0SPryNhO39qRtLM-j_xonvPR42JC6zotdAXl1XwBLFXUESi6qRmPMzYWxOqID51iepHIe7xp/s320/Screenshot+from+2019-07-04+14-57-50.png)
move with up/down and select with space, then press enter, select hosting
![](https://cdn-images-1.medium.com/max/1200/1*I-UZajRZAIh6LVCbIDujvA.png)
then CLI will ask you to select project, public directory, single page app or not, then it will creat 2 html files in /public
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIXnxeW53e-zAals45PMsGUnJyi4I0f1PNR2gtU40Rphx0cNThv-lFpuymkM1rFTMKYecQeqciBb5iEct325JSPMhDlfmU4L_jsoUhwi89N4nzVON7e33HrGAPhFSsxGWQB8nyuJd_UTOy/s320/Screenshot+from+2019-07-04+15-03-48.png)
when things are done, you can use
firebase serve
to preview the pages locally...
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDmb1e56MkHaeqJR9oBSm7OIAL0fAdGqjG62WIV2W5V99UZH5oip6qq0oOdmZSRg6KrW9QXBr974vfrXVOATfZAbKA2XHcUrATPdsjs9GGewBxJnZSfTTxuqcCA2kTTnQSRytDmkumiicT/s320/Screenshot+from+2019-07-04+15-05-51.png)
open your browser: you will see the page..
then use:
firebase deploy
to upload to firebase
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_2N7kEOoRzbmoxYO6BmraUK1w15ua58fPlf0g9AN-_2eydAnmmhdbMfeZJV_QHeIoD5vo5ZztVGeaEYHhehxkJ-umcJzOMTPtPKU7q54FzHg5C5YjaZAQBdp05AvycTjZFeEiHF2wM5Fk/s400/Screenshot+from+2019-07-04+15-08-57.png)
then you have 2 links:
Project Console: https://console.firebase.google.com/project/fbasedht11/overview
Hosting URL: https://fbasedht11.firebaseapp.com
the first one bring you to the console and the 2nd one brings to you web page:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvV2pLlO2tDFs-oNbnU4g6wsgE2o7swykVQOKHrXElPRw3mLBk_cE3OmRml0aq94Rc5LfE7DpsG2TuzdXOxcsnd-zAyejU-9XolQc4neOKylUZVnYaqT7AcDSWnnnldWfAeQxf3np7IAOP/s640/Screenshot+from+2019-07-04+15-09-27.png)
I refer to this doc:
https://medium.com/@aleemuddin13/how-to-host-static-website-on-firebase-hosting-for-free-9de8917bebf2
you first create a dir where you store your project(I already created a firebase project),
cd into your dir, and start with:
firebase login
it will show up a google login web page, and you can log in with it.
![](https://cdn-images-1.medium.com/max/1200/1*2PVw1_GwbqycMYXjlBMX-A.png)
then, continue with:
firebase init
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsIIjwfSReMPHt0YGk635Latg9FwX6Gsf6t78YqF-efiM6nRHZIi0tQKRqjuQGmAVJEj3m0SPryNhO39qRtLM-j_xonvPR42JC6zotdAXl1XwBLFXUESi6qRmPMzYWxOqID51iepHIe7xp/s320/Screenshot+from+2019-07-04+14-57-50.png)
move with up/down and select with space, then press enter, select hosting
![](https://cdn-images-1.medium.com/max/1200/1*I-UZajRZAIh6LVCbIDujvA.png)
then CLI will ask you to select project, public directory, single page app or not, then it will creat 2 html files in /public
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIXnxeW53e-zAals45PMsGUnJyi4I0f1PNR2gtU40Rphx0cNThv-lFpuymkM1rFTMKYecQeqciBb5iEct325JSPMhDlfmU4L_jsoUhwi89N4nzVON7e33HrGAPhFSsxGWQB8nyuJd_UTOy/s320/Screenshot+from+2019-07-04+15-03-48.png)
when things are done, you can use
firebase serve
to preview the pages locally...
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDmb1e56MkHaeqJR9oBSm7OIAL0fAdGqjG62WIV2W5V99UZH5oip6qq0oOdmZSRg6KrW9QXBr974vfrXVOATfZAbKA2XHcUrATPdsjs9GGewBxJnZSfTTxuqcCA2kTTnQSRytDmkumiicT/s320/Screenshot+from+2019-07-04+15-05-51.png)
open your browser: you will see the page..
then use:
firebase deploy
to upload to firebase
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_2N7kEOoRzbmoxYO6BmraUK1w15ua58fPlf0g9AN-_2eydAnmmhdbMfeZJV_QHeIoD5vo5ZztVGeaEYHhehxkJ-umcJzOMTPtPKU7q54FzHg5C5YjaZAQBdp05AvycTjZFeEiHF2wM5Fk/s400/Screenshot+from+2019-07-04+15-08-57.png)
then you have 2 links:
Project Console: https://console.firebase.google.com/project/fbasedht11/overview
Hosting URL: https://fbasedht11.firebaseapp.com
the first one bring you to the console and the 2nd one brings to you web page:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvV2pLlO2tDFs-oNbnU4g6wsgE2o7swykVQOKHrXElPRw3mLBk_cE3OmRml0aq94Rc5LfE7DpsG2TuzdXOxcsnd-zAyejU-9XolQc4neOKylUZVnYaqT7AcDSWnnnldWfAeQxf3np7IAOP/s640/Screenshot+from+2019-07-04+15-09-27.png)
留言
張貼留言