1.1.0 • Published 7 years ago

@ximerajs/express v1.1.0

Weekly downloads
1
License
-
Repository
-
Last release
7 years ago

Express Server

This plugin provides everything you need to quickly setup an express server with plenty of best-practice and standard middleware components.

Declaring express apps

The express loader will locate all *.express.js files and create an application for each of them.

Your app factory should return an object providing lifecycle hooks for your application. Right now, the supported hooks are:

  • config: Will receive the express application in parameter, before any middleware are installed
  • middleware: Will receive the array of middleware to apply. Just modify this array if you want to add more or use your custom middleware components
  • routeContext: Give you the chance to modify the context that will be made available to all route factories for your app.

Why do we need this plugin ?

Other plugins requires express support (restapi and angularjs). Instead of having both declaring their own express flavour, we generalize this.