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

Cannot use app.use with a base that contains more than one slash #217

Open
Maluscat opened this issue Dec 11, 2024 · 0 comments
Open

Cannot use app.use with a base that contains more than one slash #217

Maluscat opened this issue Dec 11, 2024 · 0 comments

Comments

@Maluscat
Copy link

Hi (again :)!

While trying to get Polka up and running, I have noticed that app.use(base, ...fn) does not work when you use a base value that contains more than one "folder".

Most minimal functioning example, assuming the existence of a local folder structure ./static/script/**, e.g. ./static/script/main.js:

import Polka from 'polka';
import Sirv from 'sirv';

const app = Polka();

// Works: /baz/main.js
app.use('/baz', Sirv('./static/script'));
// 404:   /foo/bar/main.js
app.use('/foo/bar', Sirv('./static/script'));

app.listen(8001);

Am I missing something?

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