lukeed / lukeed/polka

[question] Exposed members on Polka class

Open
#209 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.6k
Forks
176
PR merge metrics
No merged PRs in 30d

Description

As part of some migrations, i've noticed myself needing the following members from `Polka`:

- `Polka#handler` - so i can bind it to `request` myself rather than calling `listen`
- `wares` - i want to create a new `Polka` which has the same middleware stack as another. for now i've literally set `b.wares = a.wares` but maybe we should have a method for this?
- `onError` - i want to set the error handler _after_ instantiating `Polka`

basically, can i rely on these 3 things being part of the public interface? (i.e. you won't remove them without a new major)

and if not, what could we introduce to cover the same use cases in a supported way?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Polka implementation and its public API documentation, focusing on handler, wares, onError, and listen. Determine whether these members are intended to be supported and document the decision or define supported alternatives for binding a handler, reusing middleware, and setting an error handler after instantiation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.