Building an extra layer of data access on top of mongoose
For my application, node.js
I use it mongodb
as a database. Also I prefer to use mongoose.js
on top of it. My question is:
is it possible to build an additional layer on top
mongoose.js
to access the data ?. As forCRUD operations
?
as a set of common functions that does exactly what it does mongoose
and restricts coding from direct request mongoose
and can help at a later stage when we change the db or mongoose
. I'm asking this because I can't figure out how effective it would be at a later stage, but it seems annoying now. Please suggest.
source to share