1.1.0 • Published 6 years ago

image-steam-s3 v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

image-steam-blobby

S3 client for Image Steam.

Options

import isteamS3 from 'image-steam-s3';

const s3 = new isteamS3({
  endpoint: 's3.amazonaws.com',
  accessKey: 'myAccessKey',
  secretKey: 'mySecretShhh'
});
OptionTypeDefaultInfo
endpointstring"s3.amazonaws.com"Endpoint of S3 service
portnumber443Non-443 port will auto-default secure to false
securebooleantrue only if port 443Override as needed
accessKeystringrequiredS3 access key
secretKeystringrequiredS3 secret key
stylestring"path"May use virtualHosted if bucket is not in path
bucketstringoptionalS3 Bucket

Usage

Example:

import isteam from 'image-steam';

const options = {
  storage: {
    app: {
      static: {
        driver: 'http',
        endpoint: 'https://some-endpoint.com'
      }
    },
    cache: {
      driverPath: 'image-steam-s3',
      bucket: 'myBucket',
      accessKey: 'myAccessKey',
      secretKey: 'mySecretShh'
    }
  }
}

http.createServer(new isteam.http.Connect(options).getHandler())
  .listen(13337, '127.0.0.1')
;