Unitech / Unitech/pm2

pm2 serve : index.html as default file on subdirectories

Open
#2,941 8 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S: Open for PR T: Bug
Dominant language
JavaScript
Stars
43.3k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

When accessing to a subdirectorie with no file specified, we don't get index.html file which is in the directory

/
expected
/index.html (currently OK)

/subdir/ => error is dir
expected
/subdir/index.html (currently not OK)

Supporting information

PM2 version: `pm2 -v` : 2.4.6
Node version: `node -v` : node-v6.10.2-linux-x64/

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 with the pm2 serve entry point and reproduce the reported behavior for / and /subdir/ using directories containing index.html. Trace how directory requests are handled, then verify that a request to /subdir/ serves /subdir/index.html instead of returning a directory error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.