How to use the @decorators/express.attachControllers function in @decorators/express

To help you get started, we’ve selected a few @decorators/express examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github serhiisol / node-decorators / playground / express / index.ts View on Github external
/**
 * Server configuration
 */

const app: express.Express = express();

app.set('env', 'test');

Container.provide([
  {
    provide: ERROR_MIDDLEWARE,
    useClass: ServerErrorMiddleware
  }
]);

attachControllers(app, [ UserController ]);

app.listen(3000);

console.log('Server is running on http://localhost:3000');

@decorators/express

node decorators - decorators for express library

MIT
Latest version published 1 year ago

Package Health Score

51 / 100
Full package analysis