We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am not very pleased with the current API and would love suggestions.
Option 1: Decorate the app object with conditional sugar. This is kind of controversial, but it reads well:
const app = express(); conditional.decorate(app); app .if(() => true) .use(middleware1, middleware2, ...) .elseif(() = true) .use(middleware3, middleware4, ...) .else() .use(middleware5) .endif() .use(someOtherMiddleware);
Option 2: Create an expressive API, similar to above. I'm already leaning towards this.
const app = express(); app.use(conditional .if(() => true, [ middleware ]).esleif(() => true, [ middleware ]).else([ middleware ]) );
I am open to anything. Please provide full examples if you can.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am not very pleased with the current API and would love suggestions.
Option 1:
Decorate the app object with conditional sugar. This is kind of controversial, but it reads well:
Option 2:
Create an expressive API, similar to above. I'm already leaning towards this.
I am open to anything. Please provide full examples if you can.
The text was updated successfully, but these errors were encountered: