fastify-ibm-cos

1.0.1 • Public • Published

Fastify IBM COS Plugin using the IBM COS SDK

NPM

Installation

npm i fastify-ibm-cos -s

Usage

// ...Other Plugins
fastify.register(
  require("fastify-ibm-cos"),
  {
    endpoint: "s3.eu.cloud-object-storage.appdomain.cloud",
    apiKeyId: "api_key_id",
    credentials: {
      accessKeyId: "access_key_id",
      secretAccessKey: "secret_access_key"
    },
    ibmAuthEndpoint: "https://iam.cloud.ibm.com/identity/token",
    serviceInstanceId: "service_instance_id"
  },
  err => {
    if (err) throw err;
  }
);
 
fastify.get("/", (request, reply) => {
  console.log(fastify.cos); // IBM COS instance here
});

Options

The options are passed as-is to the underlying ibm-cos-sdk instance and as such one should consult the corresponding docs for what variables he/she should pass.

Author

Alex Papageorgiou

License

Licensed under GPLv3.

/fastify-ibm-cos/

    Package Sidebar

    Install

    npm i fastify-ibm-cos

    Weekly Downloads

    1

    Version

    1.0.1

    License

    GPL-3.0

    Unpacked Size

    38 kB

    Total Files

    4

    Last publish

    Collaborators

    • alex.ppg