Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change config for module definitions. #6

Closed
totherik opened this issue Feb 10, 2014 · 1 comment
Closed

Change config for module definitions. #6

totherik opened this issue Feb 10, 2014 · 1 comment

Comments

@totherik
Copy link
Member

Currently, middleware modules are specified like this:

{
   "custom": {
        "enabled": true,
        "priority": 30,
        "route": "/foo",
        "module": "./lib/middleware",
        "factoryMethod": "customMiddleware",
        "arguments": [ "foo", { "bar": "baz" } ]
    }
}

This issue proposes to switch to using strings for simple exported middleware, or objects
for including additional information:

{
   "custom": {
        "enabled": true,
        "priority": 30,
        "route": "/foo",
        "module": "./lib/middleware"
    }
}
{
   "custom": {
        "enabled": true,
        "priority": 30,
        "route": "/foo",
        "module":  {
            "name": "./lib/middleware",
            "method": "customMiddleware",
            "arguments": [ "foo", { "bar": "baz" } ]
        }
    }
}
totherik added a commit that referenced this issue Apr 23, 2014
Implement #6, update docs and dependencies.
@totherik
Copy link
Member Author

This change is available in meddleware@1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants