Go to file
cyrille 501142e59e
Update README.md
2019-05-08 18:23:31 +01:00
.circleci CircleCI integration 2019-05-08 12:04:12 +01:00
lib refactoring 2019-05-08 17:12:22 +01:00
.gitignore clean.js 2019-05-08 12:23:52 +01:00
README.md Update README.md 2019-05-08 18:23:31 +01:00
clean.js created index.js 2019-05-08 14:05:05 +01:00
index.js refactoring 2019-05-08 17:12:22 +01:00
package-lock.json created index.js 2019-05-08 14:05:05 +01:00
package.json created index.js 2019-05-08 14:05:05 +01:00
test.js added debug functionality. 2019-05-08 14:15:46 +01:00

README.md

CircleCI Codacy Badge Known Vulnerabilities BCH compliance "Lifetime Downloads" "Monthly Downloads" "Weekly Downloads"

greenlock-storage-s3

S3 backed storage strategy for greenlock-express.js (and greenlock.js)

Requirements

You will need a s3 bucket and the corresponding credentials.

Integration

greenlock-express.js


let store = require('greenlock-storage-s3').create({
    accessKeyId: accessKeyId                // Replace with your accessKeyId
    , secretAccessKey: secretAccessKey      // Replace with your secretAccessKey
    , regionName: regionName                // Replace with your regionName
    , bucketName: bucketName                // Replace with your bucketName
    , configDir: 'acme/'                    // Recommended
    , accountsDir: 'accounts/'              // Recommended
    , debug: true                           // Debug
});

var Greenlock = require("greenlock-express");

var greenlock = Greenlock.create({
    // Other options
    , store: store
});

// Continue your greenlock setup

Testing

The strategy is tested against the greenlock-store-test [https://git.coolaj86.com/coolaj86/greenlock-store-test.js]

To run the tests yourself, create a .env file with the following

// .env file
AWS_ACCESS_KEY_ID=abc           // Replace with your accessKeyId
AWS_SECRET_ACCESS_KEY=abc       // Replace with your secretAccessKey
AWS_BUCKET_REGION=abc           // Replace with your regionName
AWS_BUCKET_NAME=abc             // Replace with your bucketName

Run the following command:

$ npm run clean && npm run test && npm run clean

License

ISC