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

1.1.2 • Public • Published

Winter

Winter is a layer over the express framework to provide some extra features, like dependency injection, convention over configuration and declarative endpoints.

Project status

The project it's a provee of concept.

Quickstart

Install the package

You must to have installed some libraries before:

$ npm i -g typescript ts-node

Then install the framework:

$ npm i -s winter-core

The source tree

src
 |- server.ts
 |- test.controller.ts
package.json

Create a test.controller.ts

import { Controller, Get } from 'winter-core'

@Controller('test')
export class TestController {

    @Get('/:id')
    getAll(id:string):Promise<string> {
        return Promise.resolve(`your id is ${id}`)
    }
}

Create server.ts

import { Winter } from "winter-core";
import { TestController } from "./test.controller";

@Winter({
    controllers: [
        TestController
    ]
})
export class Server {

}

Excecute the code

$ ts-node src/server.ts

Readme

Keywords

none

Package Sidebar

Install

npm i winter-core

Weekly Downloads

24

Version

1.1.2

License

ISC

Unpacked Size

59.7 kB

Total Files

51

Last publish

Collaborators

  • josecullen