I have a Website that uses MongoDB(mongoose) and Express, NodeJS as Backend using Pug template engine for serving frontend pages.
I am working on it locally.
All image files are stored in project directory/public/uploads, it is working fine.
I wanna create a mobile app for this website which will use REST API built using Express, NodeJS.
the problem is where I can store their public assets e.g images so that both(android + web) has access to the same images etc. just like they use the same Database.
I can either store it to MongoDB but it is not recommended as the size of Database will increase & Performance will decrease a lot (all image data need to be loaded in RAM).
Keeping them in the filesystem, but how would I access them from both backends? also how I would work with them locally and after deployment?