9

Right now I'm exploring how to write an API using Express and MongoDB. I'm also using Angular to do my routes and views. I know Firebase and AngularFire can make it so I can bypass using Express all together (or so I think) and have my app be realtime.

In this article by Chris Esplin he states that he could not give up Express because he needed it to write promises instead of callbacks for cleaner code when using his npm package 'Quiver-Invoice' with Firebase, Stripe and MailChimp's Mandrill service.

In this SO post the poster says they need to use Express & Node for the ability to send emails out. I assume this is impossible if one uses only Firebase with Angular.

Also I have seen people talk about differences in authentication and security differences between the two here https://groups.google.com/forum/#!topic/firebase-talk/WF9gf--A3Qo

Question(s)

So what are the core differences between Firebase and Express?

  • Is it possible to build an API around Firebase like I can do in Express + MongoDB?

  • Is it possible (or will it be possible soon) to customize the Firebase server like one can with Express?

Community
  • 1
  • 1
  • 2
    To see if **an** API can be built around Firebase you have to look no further than the Nest API. Whether that is up to par with what **you** can do in Express and MongoDB, can only be answered if you give an example of that. – Frank van Puffelen Aug 24 '14 at 19:23
  • 1
    A great aspect of Firebase is that it quickly *becomes* the API. The clients and services just become consumers of Firebase data, reducing the server stack to a thin layer of Firebase cake and code frosting--to get a little carried away with metaphor. – Kato Aug 25 '14 at 15:11

1 Answers1

23

Firebase is a backend-as-a-service, with the flagship feature being database capability with realtime eventing. Express is a web framework for Node.js. Comparing the two is apples to oranges.

You can do whatever you want with Express/Node, but you have to manage your own servers and write backend functionality. With a BaaS like Firebase, you can avoid managing any servers at all. You can even mix the two and use Firebase for some things and your own servers for other things. This is what Flawk does.

If you're mainly looking for a way to do realtime eventing with Express, you could use something low-level like Shoe to push events to clients, or something high-level like LiveResource which allows syncing RESTy objects.

jkarneges
  • 346
  • 2
  • 3
  • 5
    And to give another very popular realtime eventing Javascript library see: [socket.io](http://socket.io) – Mercury Nov 03 '16 at 22:50