Serving back-end data from memory (rather than a DB) [closed] Serving back-end data from memory (rather than a DB) [closed] express express

Serving back-end data from memory (rather than a DB) [closed]


If you're not changing the contents of your object much, it's certainly possible and easy to do. There are even fairly robust querying options for you. If you need to update the info, then you'll limit scalability by keeping it all in memory and increase the risk of losing data.

Update

For querying, I'm assuming you're running the recent versions of Node that support ES5 and 6 array prototypes. If so, using Array.filter is a great basic query. If you need more complicated or complex stuff or can't rely on modern JavaScript the next option would be Lodash, which has pretty rich collection operations.