Please read these guidelines before submitting an issue, filing a feature request, or contributing code.
Sorry! It happens to the best of us. If you've found a bug in http-server, please search to see if it's already been reported. Otherwise, create a new issue. If you can fix the bug yourself, feel free to create a pull request thereafter.
Please include as much detail as possible to help us reproduce and diagnose the bug. Most importantly:
- Make use of the issue template!
- Let us know how you're running http-server (options, flags, environment, etc.)
- Include your test code or file(s). If large, please provide a link to a repository or gist.
- Please show code in JavaScript only (any version)
If we need more information from you, we'll let you know. If you don't within a reasonable time frame (TBD), your issue will be automatically tagged as stale and eventually closed for inactivity.
Before you get your hands dirty, please search for a related issue, or create a new one. If you wish to contribute a new feature, this is doubly important! Let's discuss your proposed changes first; we don't want you to waste time implementing a change that is at odds with the project's direction. That said, we'll happily consider any contribution, no matter how great or small.
Follow these steps to get going.
- Install the latest version of Node.js.
- If you're new to installing Node, a tool like nvm can help you manage multiple version installations.
- Follow Github's documentation on setting up Git, forking and cloning.
- Create a new branch in your fork, giving it a descriptive name
- Execute
npm install
to install the prod and dev dependencies- Do not use
yarn install
for development, as it may not get the same package versions as other developers.
- Do not use
- Make your changes and add them via
git add
.- Tests are required for any non-trivial code change. If you're having trouble making tests, go ahead and open the pull request and we can help
- Keep your PR focused. Don't fix multiple things at once, and don't upgrade dependencies unless necessary.
- Before committing, run
npm test
- Tests will also run on your PR, but running them locally will let you catch problems ahead-of-time.
- Commit your changes.
- Push your changes to your fork.
- Now on http-party/http-server, you should see a notification about your recent changes in your fork's branch, with a green button to create a pull request. Click the button.
- Describe your changes in detail here, following the template. Once you're satisfied, submit the form.
- Be patient while your PR is reviewed. This can take a while. We may request changes, but don't be afraid to question them.
- Your PR might become conflicted with the code in
master
. If this is the case, you will need to update your PR and resolve your conflicts. - You don't need to make a new PR to any needed changes. Instead, commit on top of your changes, and push these to your fork's branch. The PR will be updated, and CI will re-run.
- Please do not rebase and force-push, it ruins the git history
Excellent. Here's how:
- Handy with JavaScript? Please check out the issues labeled
help-wanted
orgood first issue
. - Wait--you write unit tests for fun? A PR which increases coverage is unlikely to ever be turned down.