Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow multiple roots #74

Open
NemoStein opened this issue Sep 6, 2021 · 0 comments
Open

[Feature Request] Allow multiple roots #74

NemoStein opened this issue Sep 6, 2021 · 0 comments

Comments

@NemoStein
Copy link

Consider the following project tree:

project-root
  ├ src
  │ └ main.js
  └ static
    └ index.html

Currently, for index.html be able to link to main.js, servor must run in the project-root folder and the script tag in html must be <script src="../src/main.js">

$ cd ~/project-root
$ servor .

It would be really useful to allow servor to serve more folders than just the root. Something like:

$ cd ~/project-root
$ servor ./static --extern ./src

This would serve the ./src folder as if it and ./static were the same.
So the index.html would link the script at same level (<script src="./main.js">)

The --extern param could be repeatable to allow multiple entrypoints

$ cd ~/project-root
$ servor ./static --extern ./src --extern ./libs

Duplicate paths (e.g.: ./static/style.css, ./src/style.css and ./libs/style.css) could be served in order (left-to-right), returning the first found path.

NemoStein added a commit to NemoStein/servor that referenced this issue Sep 6, 2021
NemoStein added a commit to NemoStein/servor that referenced this issue Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant