All Projects → rubiin → nestjs-minio

rubiin / nestjs-minio

Licence: MIT license
Your favorite object storage with nestjs

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to nestjs-minio

sdmq
is a simple delay message queue, based on redis and kotlin
Stars: ✭ 31 (-13.89%)
Mutual labels:  bucket
event-emitter
Event Emitter module for Nest framework (node.js) 🦋
Stars: ✭ 102 (+183.33%)
Mutual labels:  nest
Firstsight
前后端分离,服务端渲染的个人博客,基于 Nodejs、 Vue、 Nuxt、Nestjs、PostgreSQL、Apollo
Stars: ✭ 19 (-47.22%)
Mutual labels:  nest
fss3
FSS3 is an S3 filesystem abstraction layer for Golang
Stars: ✭ 52 (+44.44%)
Mutual labels:  minio
nestjs-rest-cqrs-example
Example for Nest.js, MySQL, Redis, REST api, CQRS, DDD
Stars: ✭ 263 (+630.56%)
Mutual labels:  nest
storage-abstraction
Provides an abstraction layer for interacting with a storage; the storage can be local or in the cloud.
Stars: ✭ 36 (+0%)
Mutual labels:  bucket
metalnetes
Create and manage multiple Kubernetes clusters using KVM on a bare metal Fedora 29 server. Includes helm + rook-ceph + nginx ingress + the stock analysis engine (jupyter + redis cluster + minio + automated cron jobs for data collection) - works on Kubernetes version v1.16.0 - 1.16.3 was not working
Stars: ✭ 37 (+2.78%)
Mutual labels:  minio
airbnb-clone
Fullstack airbnb clone made with React/Ts/Nest
Stars: ✭ 37 (+2.78%)
Mutual labels:  nest
nest-rest-mongo-boilerplate
🍱 backend with nest (typescript), mongoose, and authentication
Stars: ✭ 180 (+400%)
Mutual labels:  nest
Umbraco.Elasticsearch
Integration of Elasticsearch as a search platform for Umbraco v7.5+
Stars: ✭ 15 (-58.33%)
Mutual labels:  nest
terraform-aws-cloudfront-cdn
Terraform Module that implements a CloudFront Distribution (CDN) for a custom origin.
Stars: ✭ 89 (+147.22%)
Mutual labels:  bucket
terraform-provider-minio
Terraform provider for managing minio S3 buckets and IAM Users
Stars: ✭ 123 (+241.67%)
Mutual labels:  minio
s3x
s3x is a minio gateway providing an S3 API powered by TemporalX that uses IPFS as the data storage layer. It lets you turn any S3 application into an IPFS application with no change in application design
Stars: ✭ 85 (+136.11%)
Mutual labels:  minio
gitlab-chart
Kubernetes Helm chart to deploy GitLab
Stars: ✭ 59 (+63.89%)
Mutual labels:  minio
nest-morgan
Morgan Logger for Nestjs
Stars: ✭ 19 (-47.22%)
Mutual labels:  nest
nest-elasticsearch-vue
Autocomplete search with Nestjs, Elasticsearch and Vue
Stars: ✭ 27 (-25%)
Mutual labels:  nest
aws-nestjs-starter
Serverless, AWS, NestJS, GraphQL and DynamoDB starter
Stars: ✭ 200 (+455.56%)
Mutual labels:  nest
minio-rclone-webdav-server
A @rclone served WebDAV server with @minio as the s3 storage backend docker example
Stars: ✭ 17 (-52.78%)
Mutual labels:  minio
necord
🤖 A module for creating Discord bots using NestJS, based on Discord.js
Stars: ✭ 77 (+113.89%)
Mutual labels:  nest
azure-storage
Azure Storage module for Nest framework (node.js) ☁️
Stars: ✭ 71 (+97.22%)
Mutual labels:  nest

Nest Logo

Minio Module for Nest framework

NPM Version Package License NPM Downloads

Buy Me A Coffee

Description

This's a nest-minio module for Nest. This quickstart guide will show you how to install the client SDK and execute an example JavaScript program. For a complete list of APIs and examples, please take a look at the JavaScript Client API Reference documentation.

This document assumes that you have a working nodejs setup in place.

Installation

$ npm i --save nestjs-minio

Initialize MinIO Client

You need five items in order to connect to MinIO object storage server.

Params Description
endPoint URL to object storage service.
port TCP/IP port number. This input is optional. Default value set to 80 for HTTP and 443 for HTTPs.
accessKey Access key is like user ID that uniquely identifies your account.
secretKey Secret key is the password to your account.
useSSL Set this value to 'true' to enable secure (HTTPS) access

Provide the credentials for minio module by importing it as :

import { Module } from '@nestjs/common';
import { NestMinioClientController } from './nest-minio-client.controller';
import { NestMinioModule } from '../nest-minio.module';

@Module({
  controllers: [NestMinioClientController],
  imports: [
    NestMinioModule.register({
      endPoint: 'play.min.io',
      port: 9000,
      useSSL: true,
      accessKey: 'Q3AM3UQ867SPQQA43P2F',
      secretKey: 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
    }),
  ],
})
export class NestMinioClientModule {}

});

Then you can use it in the controller or service by injecting it in the controller as:

 constructor(@Inject(MINIO_CONNECTION) private readonly minioClient) {}

Quick Start Example - File Uploader

This example program connects to an object storage server, makes a bucket on the server and then uploads a file to the bucket.

We will use the MinIO server running at https://play.min.io in this example. Feel free to use this service for testing and development. Access credentials shown in this example are open to the public.

import { Controller, Get, Inject } from '@nestjs/common';
import { MINIO_CONNECTION } from '../constants';
import {Client} from 'minio';

@Controller()
export class NestMinioClientController {
  constructor(@Inject(MINIO_CONNECTION) private readonly minioClient: Client) {}

  @Get()
  index() {
    const file = '/tmp/app.zip';

    const metaData = {
      'Content-Type': 'application/octet-stream',
      'X-Amz-Meta-Testing': 1234,
      example: 5678,
    };
    // Using fPutObject API upload your file to the bucket europetrip.
    this.minioClient.fPutObject(
      'europetripxxx3',
      'app.zip',
      file,
      metaData,
      function(err, etag) {
        if (err) {
          return console.log(err);
        }
        console.log('File uploaded successfully.');
      },
    );
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].