Prince Tomar
Posted on August 15, 2024
This article contains steps to host Flutter Web project on Firebase Hosting.
β Requirements
- Flutter Project which does not use .env for configurations (Firebase Hosting Limitation).
- Firebase Hosting access.
- Bitbucket Admin access for configuring Pipelines.
- (Optional)GCP IAM & Admin (Used to create Service Account, if you want to configure CI/CD pipeline.)
- Firebase CLI
πSections
Setup Firebase Hosting
1.Create Firebase Project & Hosting Setup
2.run command -
firebase init
, in your project directory terminal
3.After running the command Firebase asks me if I wish to proceed.
Type y and hit the enter key.
4.Next, select what features you need in my project. In this article,
hosting is all we need, I've used arrow keys to move
between the features, select hosting using the space bar key,
and then hit the enter key.
5.To use an existing Firebase project? or creating a new
firebase project? or add to an existing Google Cloud Platform
Project? or donβt set up a default project? Since I have an
existing project, I will hit the enter key.
Use the arrow key to move and hit the enter key to select a
project.Firebase asks what we want to use as the public directory. The
default name public is in the bracket and you can type the
name of any other directory you want to use. As I have the
public directory ready, I hit the enter key.
- Before deploying our website, we must ensure that if everything works as desired in our local server.
RUN -
firebase serve
Firebase Deployment
- Once testing is done, we deploy our project using the deployment command and make it live for other users. RUN - `
firebase deploy
`
Posted on August 15, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.