@sftech/nestjs-core v0.0.19
@sftech/nestjs-core
A foundational NestJS utility library that provides bootstrapping logic, base application and domain interfaces, and modular composition for scalable backend architecture.
Installation
Install via npm:
npm install @sftech/nestjs-coreor with yarn:
yarn add @sftech/nestjs-coreFeatures
NestjsCoreModule: Preconfigured module for quickly setting up NestJS apps- Shared bootstrap utilities (e.g.,
bootstrapApp) - Application-layer interfaces (e.g.,
BaseUseCase) - Domain-level patterns like
Factory<T>
Usage
Import the Core Module
In your AppModule or any feature module:
import { NestjsCoreModule } from '@sftech/nestjs-core';
@Module({
imports: [NestjsCoreModule],
})
export class AppModule {}to use the configuration feature add following line in app.module.ts before the module class Configuration.load('path to your config-file');
to use the Logger within your app you have to add the Logger to the providers array of your module class.
...
import {join} from "path";
Configuration.load('path to your config-file');
@Module({
imports: [NestjsCoreModule.register({statusRoute: true})],
controllers: [],
providers: [Logger],
})
export class AppModule {}Bootstrap Your App
To have a clean entry point, use the AppBootstrapper.run(AppModule, config) function in main.ts
AppBootstrapper.run(AppModule, appConfig)Appmodule: The main module of your application.appConfig: The configuration object for your application. It's of type IBootstrapConfig.
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago