0.0.19 • Published 1 month ago

@sftech/nestjs-core v0.0.19

Weekly downloads
-
License
-
Repository
-
Last release
1 month 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

1 month ago

0.0.18

2 months ago

0.0.17

2 months ago

0.0.16

3 months ago

0.0.15

3 months ago

0.0.14

3 months ago

0.0.13

3 months ago

0.0.12

3 months ago

0.0.11

3 months ago

0.0.9

3 months ago

0.0.8

3 months ago

0.0.7

3 months ago

0.0.6

3 months ago

0.0.5

3 months ago

0.0.4

3 months ago

0.0.3

3 months ago

0.0.2

3 months ago

0.0.1-alpha.0

3 months ago

0.0.1

3 months ago