Firebase is a full backend framework designed by Google
Already have a google account? Perfect!
Setting up a Firebase project is easy. Just visit the main Firebase homepage click the button that says "Get Started" and then "Create Project"
Accept the terms & conditions, then hit "Continue"
Accept all applicable terms & conditions, and Continue
Congratulations! You now have a Firebase App!
The Dashboard is the control room, from which you can modify your application.
User authentication tends to be very hard, and comes in several flavors.
Firebase supports both credential based login (username/password) and OAuth integration, and makes user authentication relatively easy.
Firebase provides two databases the Real Time Database, and Cloud FireStore.
You can also host your webapps through Firebase. Deploy using the Firebase CLI
The Firebase CLI allows you to connect to, and interact with your Firebase application from your local terminal.
While there are installers available it's recommended that you install using npm: npm install -g firebase-tools
cd my-firebase-project
firebase login
firebase init
public
firebase deploy
The Firebase CLI can be used to do more than just deploy apps
The firebase.json
file is generated automatically, and tracks the settings for your firebase app. If you have static files in a public
subdirectory the default setup will work.
The value of the public
property in the hosting
section of the file is the location Firebase's hosting service will attempt to serve files from.
The functions section allows you to add scripts, and listeners to your Firebase application so that it can have the functionality of a full server, without having to actually set up a server file.
The ML Kit for Firebase provides integration for other Google Machine Learning technologies so you can bring the power of artificial intelligence to your app.
While you can create an app that will live, and work entirely within Firebase it is quite common to create an external app, hosted elsewhere, and connect it to Firebase on the back end to utilize some of the tools avalable in Firebase.
Firebase is developed, and maintained by Google. As such it is part of the Google ecosystem.
What this means for us is that Firebase will work with other Google services with no setup, or minimal setup needed.
Setting up OAuth authentication with Google Login is a breeze with Firebase, though other OAuth providers, such as GitHub, might require a more complex setup.
cd
into it, and initialize it: npm init -y
npm install express firebase
Link your server to your firebase app
Test out the connection by creating a new user with email and password. The following code snippet assumes you set your initialized firebase app to a variable called firebaseApp:
firebaseApp.auth().createUserWithEmailAndPassword(email, password)
Visit your firebase dashboard and check the Authentication section to make sure your new user has been created
/