Can I use Firebase in a MEAN app?

Background

I am creating an Angularjs application and have added the express and mongodb application to the application already, but when searching for some other auxiliary tools, I came across firebase.

I'm just a little confused how this all fits together, and would appreciate some experienced users contributing to it.

Question

Does firebase replace the need for mongodb and parts of an expression, or does it work with them?

If they do not work together, why should I use one over the other?

+5
source share
1 answer

MEAN stands for Mongo, Express, Angular, and Node.

If you use Firebase, you basically replace the MongoDB part of the MEAN Firebase stack. You still rely on Node / Express to be your server infrastructure, and Angular is your client infrastructure. Firebase will serve as your data source, not MongoDB.

The initial configuration will be different. Therefore, if you started with some kind of generator (for example, a Yeoman or MEAN template), you probably need to log in and remove any links to MongoDB and Mongoose.

To answer the question "Why use one over the other", it really is up to you. Both of them are good solutions.

Firebase is apparently better for real-time data, and in my experience it is easier or faster to prototype than Mongo. If you encounter heavy use of Firebase, you will have to start paying for it.

MongoDB can have more documentation when it comes to using it with the MEAN stack.

+8
source

Source: https://habr.com/ru/post/1234444/


All Articles