v3.0.0
<a name"3.0.0">
3.0.0 (2016-07-26)
Features
- plugin: add multi-transport router plugin (6fac4361)
Breaking Changes
-
AMQP plugin
- removed build-in router
-
use
routermodule instead of build-in router/** CONFIG */ // before config = { plugins: ['amqp'], amqp: { prefix: 'users', postfix: path.join(__dirname, 'actions'), initRoutes: true, initRouter: true, } }; // after config = { plugins: ['router', 'amqp'], amqp: { router: { enabled: true, }, }, router: { routes: { directory: path.join(__dirname, 'actions'), transports: ['amqp'], }, }, }; /** ACTION */ // before module.exports = function action(message) { // `message` contains message from rabbitmq } // after function action(request) { // `request.params` contains message from rabbitmq } action.schema = 'validationSchema'; // you can use `schemaLessAction` router extension to avoid setting schema action.transports = ['amqp']; // you can set `setTransportsAsDefault` from router config as `true` to avoid setting transports module.exports = action;
-
- changed config format
-
transportoptions can be configured intransportsection// before const config = { amqp: { connection: { host: 'rabbitmq', port: 5672, }, }, }; // after const config = { amqp: { transport: { connection: { host: 'rabbitmq', port: 5672, }, } }, };
-
add
routersection that allows to enablerouterplugin
-
- changed router binding function name from
MService.routertoMService.AMQPRouter
- removed build-in router
-
SocketIO plugin
- removed build-in router
- use
routermodule instead of build-in router
- use
- changed config format
socket.iooptions can be configured inoptionssection- add
routersection that allows to enablerouterplugin
(6fac4361)
- removed build-in router