From fbfc08b623ab19c83c549636107babdfe7276663 Mon Sep 17 00:00:00 2001 From: Cyrille Date: Wed, 8 May 2019 15:20:09 +0100 Subject: [PATCH] Update Readme.md --- README.md | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8462e5b..c4d953e 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,42 @@ S3 backed storage strategy for greenlock-express.js (and greenlock.js) ## Requirements -- AWS Account -- S3 Bucket -- Access to S3 Bucket via the AWS CLI (accessKeyId, secretAccessKey) +You will need: +1. S3 Bucket (more info.) +2. AWS API credentials with read and write access to the bucket (more info.) -For more information see https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html +You will need to pass the following information to greenlock-storage-s3 +1. Your accessKeyId +2. Your secretAccessKey +3. Your regionName +4. Your bucketName + +## Integration + +### greenlock-express.js + +```javascript + +let store = require('./index').create({ + accessKeyId: accessKeyId // Your accessKeyId + , secretAccessKey: secretAccessKey // Your secretAccessKey + , regionName: regionName // Your regionName + , bucketName: bucketName // 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 + +``` ## License