Create Firebase Web App
After you have created a Firebase project (see Setup Firebase), you can add multiple apps to that project. Here we will create the Hello Doctor Web app so the web version can use the same Firebase backend as the mobile app.
Add Hello Doctor Web app to your Firebase project
Open the Firebase Console and select your existing Hello Doctor project.
On the project overview page, click the Web icon (the one with angle brackets) to add a new web app.
When prompted, enter the App nickname:
Hello Doctor Web(or a name of your choice).You can leave Firebase Hosting unchecked for now if you only need to run the app locally. Click Register app.
Firebase will show your Firebase configuration (a JavaScript object with
apiKey,authDomain,projectId,storageBucket,messagingSenderId,appId). Copy this configuration—you will need it for the next step when setting up your.envfile.
Keep your Firebase config (especially apiKey) in a .env file and do not commit it to version control. The next page explains how to set up the environment file.
- Click Continue to console. Your Hello Doctor Web app is now registered under the same Firebase project as your mobile app, so they share the same backend, authentication, and data.
Next, open the Hello Doctor Web project and configure the environment file with these credentials.