GithubHelp home page GithubHelp logo

Accepts array for middleware about connect HOT 5 CLOSED

brettz9 avatar brettz9 commented on May 26, 2024
Accepts array for middleware

from connect.

Comments (5)

dougwilson avatar dougwilson commented on May 26, 2024

The reason this was removed is because this kind of sugar was left to Express in the Connect/Express split.

If you want that sugar use Express. If you want zero sugar, use Connect.

from connect.

brettz9 avatar brettz9 commented on May 26, 2024

This just strikes me as being dogmatic to the detriment of the one main function of the project--being able to conveniently add multiple middleware (where middleware is itself a form of convenience).

To me, it is Java ugliness rather than JavaScript elegance, and forcing an unnecessary choice. But, hey, it's obviously your call...

from connect.

dougwilson avatar dougwilson commented on May 26, 2024

It's the entire team's call. The issue you referenced I didn't even comment in, so I am not the sole operator here.

from connect.

brettz9 avatar brettz9 commented on May 26, 2024

Sorry, I wasn't trying to make this personal or at all intemperate. I just mean "your" in the collective sense.

It was just my hope that some things could be open for revisiting. The browsers tend to act these days on the approach of yes, starting with a simple API, and seeing what libraries come up with on top of the APIs, but then later picking up some of the most useful ones to standardize on to add into core--even if while these features can be implemented with libraries (e.g., document.querySelector).

from connect.

dougwilson avatar dougwilson commented on May 26, 2024

This project is the bare bones as it is designed. All the APIs that were picked up because they were useful to someone were added to the project known as "express". Your exact want of accepting array in .use is an express for example.

If what everyone wanted was added to connect, then connect would just be express. There are two projects so if someone wants the bare bones and only wants to add the sugar they want, they can start somewhere (connect) but they also have a module that had all the sugar people wanted added (express).

There is nothing to reconsider; the API was already added and that's why it is in express.

from connect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.