Note: Inspired by NestJS
A simple Node.js OOP framework for building apps in the way you like.
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