Firebase is a mobile and web application development platform. It is owned by Google. Firebase provides below services/features -
- Functions (Cloud functions)
- Test Lab
- Crash Reporting
- Notifications (Firebase Cloud Messaging - FCM)
- Remote configs
- Dynamic Links
Lets take a look on “Hosting” service provided by firebase.
Firebase Hosting is very easy to use and anyone can deploy and see a static website working in 4 simple steps - Login to firebase, Add project, Initialize project and Deploy.
Login to firebase
Click “Add Project”
Enter Project Name e.g. “MyFirstWebsite” and Country/Region e.g. “India”
And then “Create Project” button
Install Firebase CLI, Firebase CLI depends upon
npm. Install Nodejs which comes with
npm. So, no need to install
npmseparately. Then firebase CLI, open command line interface/terminal of your OS and type -
$ npm install -g firebase-tools
Initialize your website.
cdto your local website project and type
$ firebase init
select type to “hosting”, press space and enter. select project “MyFirstWebsite” which you created on firebase and enter.
firebase initwill create few files and directory in your project directory e.g.
Move all your website files(
publicdirectory available at root of your website project directory.
At last in terminal type -
$ firebase deploy
As soon as your code deploys you will see a sub-domain created for your website with firebase.com domain, may be something link ->
If you want your own personal site and you can buy any domain and can always link that domain with your firebase project.