@leadinvr/nestjs-starter
TypeScript icon, indicating that this package has built-in type declarations

1.2.16 • Public • Published

Starter for NestJS

starter module for nestjs

npm version npm total downloads npm monthly downloads npm license

Quick Start

Install

npm i @leadinvr/nestjs-starter

Usage

Environment Setup

启动模块需要设置以下变量

/**
 * StarterOption interface for configuring the NestJS application.
 * It includes options for body parser limit, CORS, and an initialization function.
 */
export class StarterModuleOptions {
    /**
     * The URL for the Redis server.
     */
    redisUrl: string = "";

    /**
     * The time-to-live (TTL) for Redis cache in seconds.
     */
    redisTTL: number = 10; // Default TTL for Redis cache in seconds

    /**
     * The workspace name for Redis, default is "default".
     */
    redisWorkspace: string = "default";

    /**
     * The secret for JWT tokens.
     */
    jwtSecret: string = "jwt-secret";

    /**
     * The issuer for JWT tokens.
     */
    jwtIssuer: string = "jwt-issuer";

    /**
     * The audience for JWT tokens.
     */
    jwtAudience: string = "jwt-audience";
}

Startup

export async function startup(module: any, opt: StarterOption);

Readme

Keywords

Package Sidebar

Install

npm i @leadinvr/nestjs-starter

Weekly Downloads

1

Version

1.2.16

License

Apache-2.0

Unpacked Size

35.2 kB

Total Files

24

Last publish

Collaborators

  • stanleyhou