Personally, I use Firebase most of the time, while for other projects where I needed a backend, I used SailsJS once (and I'm sure I don't want to use it anymore!) and for a couple of projects, I used Koa, which I really like.
So what framework do you use?
Moreover, what's your advice for building a REST API with MongoDB + user auth (password and OAuth2), I don't need any templating system, I'll build a Vue SPA.
Of course, the choice depends on the 1000s of reasons, but I'd like to hear your opinions.
I use Firebase with Cloud Functions for Firebase to host my back end. Cloud Functions is built off of Express.js, so you can serve an Express app by mounting it directly to a Cloud Functions endpoint:
https://firebase.google.com/docs/hosting/functions#use_a_web_framework
Firebase has auth, hosting and databases, so you won't have to write any of that yourself. It saves me tons of time.
Yeah, Firebase is definitely my first choice for SaaS apps, the only limit I have is with Firestore query capabilities and security rules, for some apps I really couldn't use it so I chose MongoDB and MongoStitch serverless platform, which is worse than Firebase but at least has the power of MongoDB.
Makes sense. Use the database that fits your needs. I've used Firestore, the Realtime Database and Redis on the same project. There's nothing wrong with a little mix-and-match.
For apps:
I've 99% moved out of the Node ecosystem, though long ago I used a number of different frameworks (including Sails). One difficulty is critical mass. Sails was good in that it took care of the major pieces of the app, but such a small portion of the community was using it that it just never got the documentation or enhancements. I used to like Meteor too, but it had its own issues and was even more isolated.
Probably the best option I've seen more recently is Feathers. Nowadays I write almost all my back-ends in Elixir but if I do need a Node back-end, I'll reach for Nuxt+Feathers.
Yeah, Sails is good for the first days because everything just works without effort, but then if you need to do something that deviates from its philosophy, it is a mess. I have only 1 Sails app in production and every time I need to fix something or add a feature, it's a real pain. And I'm not talking about ParaSails, their custom library for integrating Vue... OK I stop :D
FeathersJS seems really interesting, I'm reading the intro guide just now and I think I'll give it a try.
Currently using NestJS. A bit early to judge, but it's promising (especially if the frontend is built with Angular, like in my case)
Ah NestJS is interesting, I looked at it and at AdonisJS as well, did you built a REST API for Angular with Nest? how was your experience?
At the moment I am using it with Firebase Cloud functions for SSR my app and custom endpoints. My app is very frontend heavy so I at the moment I only scratched the surface. But it's pretty nice.
This comment was deleted 6 months ago
Nice, a lot of things I wanted to try! Do you suggest IoC also for smaller apps? GraphQL scares me a bit, it seems complex to set up a REST API... did it take long for you rather than a REST API?
This comment was deleted 6 months ago
I'm very curious to try IoC and DI, but for now, I'll skip GraphQL, I'll stick to REST...