hyperloris / nestjs-tile38

Tile38 module for Nest framework (node.js)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest Logo

NPM Version Package License NPM Downloads CI Status Coverage

Description

Tile38 module for Nest. This package is based on Tile38-ts, so visit its documentation for any questions about the API.

Installation

$ npm i --save nestjs-tile38 @tiermobility/tile38-ts

Quick Start

First, import the Tile38Module into your root module:

import { Module } from '@nestjs/common';
import { Tile38Module } from 'nestjs-tile38';

@Module({
  imports: [
    Tile38Module.forRoot({
      url: 'redis://localhost:9851',
    }),
  ],
})
export class AppModule {}

Second, inject the Tile38 client into any of your injectables by using the InjectTile38 decorator:

import { Injectable } from '@nestjs/common';
import { InjectTile38 } from 'nestjs-tile38';
import { Tile38 } from '@tiermobility/tile38-ts';

@Injectable()
export class AppService {
  public constructor(@InjectTile38() private readonly tile38: Tile38) {}
}

License

Licensed under MIT.

Acknowledgements

About

Tile38 module for Nest framework (node.js)

License:MIT License


Languages

Language:TypeScript 94.8%Language:JavaScript 4.3%Language:Shell 1.0%