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

[Question] Serve multiple folders #98

Open
aelbore opened this issue Feb 20, 2021 · 4 comments
Open

[Question] Serve multiple folders #98

aelbore opened this issue Feb 20, 2021 · 4 comments

Comments

@aelbore
Copy link

aelbore commented Feb 20, 2021

in sirv its possible to serve multiple folders with each folder has its own index.html? thanks

@maxmilton
Copy link

maxmilton commented May 17, 2021

Do you mean with one instance of sirv or multiple instances of sirv each with their own dir + routing (e.g. with https://github.com/lukeed/polka)? Both are possible. What's the issue you're having exactly?

@aelbore
Copy link
Author

aelbore commented May 17, 2021

1 instance of sirv for example
sirv public,dist

this will serve a 2 folders as static folders (public and dist)

@maxmilton
Copy link

As long as they're both under the same root directory then it's easily doable by serving that root dir.

.
├── dist
│  └── index.html
└── public
   └── index.html

If they're in different places, perhaps as a build step you could move or copy the dirs to a common root.

@aelbore
Copy link
Author

aelbore commented May 17, 2021

@maxmilton thanks for the reply.
in my case i will only serving 2 folders in the root folder some are not allowed to serve, so i need to select only 1 or 2 folders from root folder.

another case is i will only serve some folders of src folder not the all the folder src.

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

2 participants