FortKnox
Enhancement methods to Knox the AWS s3 module, with these methods you can create a bucket, remove a bucket, create a website and activate a standard website policy.
Install
npm install fortknox
Api Methods
Fort Knox supports all methods that knox supports and adds the following methods:
- createBucket
- deleteBucket
- createWebsite
- deleteWebsite
- enablePolicy
- disablePolicy
fortknox.createBucket createBucket(fn)
fortknox.createBucket builds a new bucket based on your client options.
fortknox = require 'fortknox'client = fortknoxcreateClientkey: 'FOO'secret: 'BAR'bucket: 'www.foobar.com'clientcreateBucket consolelog respstatusCode
fortknox.deleteBucket deleteBucket(fn)
fortknox.deleteBucket removes a bucket based on your client options.
fortknox = require 'fortknox'client = fortknoxcreateClientkey: 'FOO'secret: 'BAR'bucket: 'www.foobar.com'clientdeleteBucket consolelog respstatusCode
fortknox.createWebSite createWebSite(fn)
fortknox.createWebSite convert bucket into a website.
fortknox = require 'fortknox'client = fortknoxcreateClientkey: 'FOO'secret: 'BAR'bucket: 'www.foobar.com'clientcreateWebSite consolelog respstatusCode
fortknox.deleteWebSite deleteWebSite(fn)
fortknox.deleteWebSite remove website config from a bucket.
fortknox = require 'fortknox'client = fortknoxdeleteWebSitekey: 'FOO'secret: 'BAR'bucket: 'www.foobar.com'clientdeleteWebSite consolelog respstatusCode
fortknox.activatePolicy activatePolicy(fn)
fortknox.activatePolicy activate policy config from a bucket.
fortknox = require 'fortknox'client = fortknoxactivatePolicykey: 'FOO'secret: 'BAR'bucket: 'www.foobar.com'clientactivatePolicy consolelog respstatusCode
fortknox.deactivatePolicy deactivatePolicy(fn)
fortknox.deactivatePolicy activate policy config from a bucket.
fortknox = require 'fortknox'client = fortknoxdeactivatePolicykey: 'FOO'secret: 'BAR'bucket: 'www.foobar.com'clientdeactivatePolicy consolelog respstatusCode
Testing
npm test
Contribute
Pull Requests welcome!
Thanks to
- learnbo0st for creating knox
License
see LICENSE