Skip to content
/ tide Public

No frills node js framework with injection at its core

Notifications You must be signed in to change notification settings

soates/tide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tide

No frills node js framework with injector at its core with simple attribute based routing.

Todo

  1. Implement missing verbs
  2. Request lifetime injectables
  3. Middleware
  4. Security

Example usage

>> 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);


 

About

No frills node js framework with injection at its core

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published