invierno
v1.1.4
Published
Minimal POO backend TS framework
Downloads
43
Readme
Note: Inspired by NestJS
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
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