Mono module to manage storage (fileSystem, S3)
npm install --save mono-drive
Then, in your configuration file of your Mono application (example: conf/application.js
):
module.exports = {
mono: {
modules: ['mono-drive']
}
}
mono-drive
will use the mono.drive
property of your configuration (example: conf/development.js
):
module.exports = {
mono: {
drive: {
fs: {
root: '' //path of the root directory
},
s3: {
key: // Access key id `accessKeyId`
secret: // secret access key `secretAccessKey`
region: // region
}
}
}
}
In your src/
files of your Mono project, you can access exposed methods like this:
const { get, put, del } = require('mono-drive')
See the contribution guidelines of this project.
MIT © gaetansenn