@motech-development/bootstrap
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

npm size sonar

@motech-development/bootstrap

Bootstrap NestJS REST API and microservice applications

Quickly get a NestJS app up and running with built in network logging, input validation and application crash logging. Supports both Nest applications and microservices.

Installation

Add @motech-development/bootstrap as a dependency.

# Yarn
yarn add @motech-development/bootstrap

# NPM
npm i @motech-development/bootstrap

Usage

Use the bootstrap on your application entry point.

import { bootstrap } from '@motech-development/bootstrap';

const api = NestFactory.create(RestApiModule);

const service = NestFactory.createMicroservice(MicroserviceModule);

const port = 8080; // Optional. Defaults to 3000. Can also be set using the PORT environment variable.

bootstrap(
  {
    api, // Optional
    service, // Optional
  },
  port,
);

Readme

Keywords

none

Package Sidebar

Install

npm i @motech-development/bootstrap

Weekly Downloads

1

Version

1.0.7

License

MIT

Unpacked Size

13.8 kB

Total Files

9

Last publish

Collaborators

  • mogusbi