No frills node js framework with injector at its core with simple attribute based routing.
- Implement missing verbs
- Request lifetime injectables
- Middleware
- Security
>> Controller
@Controller('todo')
export class TodoController {
constructor(private service: TodoService) {
}
@Get('/')
public async get(): Promise<any> {
return await this.service.items;
}
@Post('/')
public async post({ payload }): Promise<any> {
await this.service.items.push(payload);
return payload;
}
}
>> Service
@Inject()
export class TodoService {
public items: Array<any> = [];
}
>> Server
new TideServer()
.services([
TodoService
])
.controllers([
TodoController
])
.listen(8080);