npm.io
0.1.1 • Published 2 years ago

expressjs-helper

Licence
MIT
Version
0.1.1
Deps
2
Size
42 kB
Vulns
0
Weekly
0

expressjs-helper

This library is a utility library that runs on top of express and is lightweight, but supports many convenient functions for using express.

npm i expressjs-helper

Only TypeScript is supported.

How to use

// controller/TestController.ts
@RestController()
export class TestController{

    @Get("/hello")
    get(){
        return "helloWorld";
    }
}

// app.ts
const app: Express = express();
const port = 8000;

app.use(expressHelper());
app.use(expressHelperEndpoint());


app.listen(port, () => {
    console.log(`Server is running on http://localhost:${port}`);
});

Keywords