@weaverkit/express
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

@weaverkit/express

Collection of helper non-obstructive classes and utilities to make Node.js app development faster with express

Installation

npm install --save @weaverkit/express express express-validator
npm install --save-dev @types/express

Usage

import { WeaverExpressApp, RouteCollection } from "@weaverkit/express";
import { ErrorHandler } from "@weaverkit/errors";
import { UserRouter } from "./user.router";

const errorHandler = new ErrorHandler();

errorHandler.on("handle", (error: Error) => {
	console.error(error);
});

const routes: RouteCollection = {
    user: UserRouter
}

const weaver = new WeaverExpressApp({
    errorHandler,
    routes
});

weaver.init();

weaver.app.listen(3000, () => {
	console.log("Listening on 3000");
});

Readme

Keywords

none

Package Sidebar

Install

npm i @weaverkit/express

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

149 kB

Total Files

29

Last publish

Collaborators

  • iyiolapeter