node.js - What is the best approach in nodejs to switch between the local filesystem and Amazon S3 filesystem? -


i'm looking best way switch between using local filesystem , amazon s3 filesystem.

i think ideally wrapper both filesystems can code against. configuration change tell wrapper filesystem use. useful me because developer can use local filesystem, our hosted environments can use amazon s3 changing configuration option.

are there existing wrappers this? should write own wrapper? there approach not aware of better?

i idea build wrapper can use either local file system or s3. i'm not aware of existing provide you, interested hear if find anything.

an alternative use sort of s3 file system mount, application can use standard file system i/o data might written s3 if system has location configured s3 mount. don't recommend approach because i've never heard of s3 mounting solution didn't have issues.

another alternative design application use s3, , use sort of s3 compatible local object storage in development environment. there several answers this question provide s3 compatible service during development.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -