nitrojs / nitrojs/nitro

custom bun server options

Open
#1,852 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement preset:bun v2
Dominant language
TypeScript
Stars
11.2k
Forks
899
Avg merge
2d 24m
Merged PRs (30d)
40

Description

Describe the feature

Some presets has extra options that can be set to change. For example: In Bun.sh we can add reusePort: true to let the user use PM2 to start an application


const server = Bun.serve({
    port: 3000,
    // @ts-ignore
    reusePort: true, // allow Bun server instances to use same port
    fetch(request) {
        if (process.pid) {
            console.log(process.pid);
        }
        return new Response("Welcome to Bun!");
    },
});

Additional information
  • Would you be willing to help implement this feature?

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 Bun preset and the code that builds or configures its server options; no file or test is named in the issue. Trace how preset-specific options are currently handled, then verify that a Bun server can receive options such as reusePort without breaking existing presets.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, typescript
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.