When I want to set the options and a path prefix for a plugin it looks like this:
server.pack.register({
plugin: require("my-plugin"),
options: {
foo: "bar"
}
}, {
route: {
prefix: "/myprefix"
}
}, function () {
...
});
It looks like the object containing the route definition seems unnecessary clutter. Would it be possible to offer setting the route in the plugin definition? Somehow like:
server.pack.register({
plugin: require("my-plugin"),
options: {
foo: "bar"
},
route: {
prefix: "/myprefix"
}
}, function () {
...
});
When I want to set the options and a path prefix for a plugin it looks like this:
It looks like the object containing the route definition seems unnecessary clutter. Would it be possible to offer setting the route in the plugin definition? Somehow like: