0.0.19 • Published 10 months ago

@sftech/nestjs-core v0.0.19

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

@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-core

or with yarn:

yarn add @sftech/nestjs-core

Features

  • 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.

0.0.19

10 months ago

0.0.18

11 months ago

0.0.17

11 months ago

0.0.16

11 months ago

0.0.15

11 months ago

0.0.14

11 months ago

0.0.13

11 months ago

0.0.12

11 months ago

0.0.11

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1-alpha.0

12 months ago

0.0.1

12 months ago