restify / restify/node-restify

Extending IncomingMessage and ServerResponse instead of mutating the prototype

Open
#1,849 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.7k
Forks
975
Avg merge
1d 6h
Merged PRs (30d)
5

Description

Why?

on 9.x, since we are dropping support for Node v8.x, we can pass an options object to http.createServer with an IncomingMessage and a ServerResponse parameters to be used as classes for req and res.

It will cleanup the code and could potentially bring performance benefits.

Are you willing and able to implement this?

Yup!

Contributor guide

Open the contributing guide

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 locating the server setup that calls Node's http.createServer and the code that mutates IncomingMessage and ServerResponse prototypes. Confirm how request and response classes are currently selected, then verify that the server uses the createServer options and no longer relies on prototype mutation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.