invierno
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

Note: Inspired by NestJS

A simple Node.js OOP framework for building apps in the way you like.

NPM Version Package License NPM Downloads

Description

Invierno is a simple framework for building just API applications with minimal configuration, following best practices and patterns, is built with TypeScript (preserves compatibility with pure JavaScript) and combines the best of AOP & OOP

You can use whatever you want with Invierno, Express, Serverless, Fastify... It doesn't matter, you are in control to use what you want.

Getting started

Configure your starting point as follow (index.ts)

import { Main, IConfiguration } from 'invierno';
import { HttpServer } from 'invierno-fastify';
import './controllers';

@Main({
  logger: true, // Or provide any logger instance you want like console
})
@HttpServer(3000) // Enable fastify to serve as http server
export class Application implements IMain {
  // onLoad?(configuration: IAppConfiguration): IAppConfiguration | Promise<IAppConfiguration>;
  // onLoaded?(configuration: IAppConfiguration): void;
}

Now configure your controller (controllers/index.ts)

import { Controller, Get } from 'invierno';

@Controller('api/v1/status')
export class ControllerTest {
  @Get()
  public status() {
    return 'ok';
  }
}

Looking for docs?

Go here

Readme

Keywords

Package Sidebar

Install

npm i invierno

Weekly Downloads

5

Version

1.1.4

License

ISC

Unpacked Size

60.7 kB

Total Files

122

Last publish

Collaborators

  • jdsancheze