News for hackers. Stuff that matters.
Re:Why and how to use service injection in Node.js by yasserf on Monday November 01, 2021 @02:22AM (#29063572)
I agree with the child comment that using different databases can hide away special database features (although ORMs unfortunately seem to be doing that anyways).

However I completely agree with what what's really important is the different types of services you run based on the implementation.

So for example when I develop my applications completely off grid, I use express + reaper to mimic S3 / cloud storage. When I deploy just swap it out with the AWS S3 service instead.

I also got inspired to use this pattern when building deepstream.io, it's a node server that can take any database/cache/message bus/etc and pretty much run with it (with a small library adaptor). In that case we basically say 'the minimum requirement for functionality is XYZ and if the service provides is, we are in. Super useful.

There are no comments on this comment yet.