2 ms·
I use NodeJS like AWS lambda functions but running on my own tiny VPS (Digital Ocean droplets). Why instead of lambda? B/c I have zero restrictions on NPM packa
by bikamonki 10y ago
I use NodeJS like AWS lambda functions but running on my own tiny VPS (Digital Ocean droplets). Why instead of lambda? B/c I have zero restrictions on NPM packages and many other things I can use. Now, I do not write full APIs, instead I use everything a BAAS has to offer (like Firebase) and complement what it lacks. For example:
- When a Firebase ref changes I listen to the event in Nodejs and update a full text search index elsewhere.
- When a Firebase ref is created I send the appropriate transactional email/push/sms.
- Do data validations before pushing to Firebase.
So in general, I do things that cannot/should not be done on the client-side while still opting for serverless architectures.
PS: Parse.com was great in that it had server-side code that was run on events like object updated/created. The code was NodeJS. In sum, it had lambda-like functionality already built-in. But Parse.com closed shop. Not sure if any of its spin-offs are offering a good service at decent prices.