-
-
Notifications
You must be signed in to change notification settings - Fork 278
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] add an ability to serve SPA (single page application) app #474
Comments
Hm, yeah for SPAs it's not quite clear that one shouldn't really currently use |
I also tried using:
Both had similar result: quiz-seed/dist on master [!?] via ⬢ v14.15.4
❯ miniserve index.html
Quit by pressing CTRL-C
01:54:24 [ERROR] Route /compiled-dff33da8ba754e62.css could not be found
01:54:24 [ERROR] Route /index-f7adbebf1e2a9498.js could not be found
01:54:37 [ERROR] Route /compiled-dff33da8ba754e62.css could not be found
01:54:37 [ERROR] Route /index-f7adbebf1e2a9498.js could not be found In browser: GEThttp://127.0.0.1:8080/compiled-dff33da8ba754e62.css
[HTTP/1.1 404 Not Found 0ms]
GEThttp://127.0.0.1:8080/index-f7adbebf1e2a9498.js
[HTTP/1.1 404 Not Found 0ms]
Loading module from “http://127.0.0.1:8080/index-f7adbebf1e2a9498.js” was blocked because of a disallowed MIME type (“”). 127.0.0.1:8080
GEThttp://127.0.0.1:8080/favicon.ico
[HTTP/1.1 500 Internal Server Error 0ms] Using Using |
That's interesting. I host plenty of SPAs using miniserve by simply providing the path to the application root. Will have to investigate. Might actually be the MIME types from the looks of it. |
Thanks! Fyi. I tried other app. quiz-seed/dist on master [$!?] via ⬢ v14.15.4 took 15s
❯ microserver . --port 8000 This is the |
Isn't the issue that it is not possible to define a fallback index ? ( same as #192 ) Due to this issue I use simple-http-server with the |
Related actix/actix-web#2115 |
Nice work ! This deserves to be documented in the README, IMHO. |
I documented the new stuff in the README. |
Great, thanks ! |
Hi.
IMHO.
miniserve
doesn't able to serve SPA app.Below is the demo.
quiz-seed
is quiz app built usingseed.rs
.In the browser:
I tried the same step with
python3 -m http.server 8080
and had the same result asminiserve
.It can't find
quiz
andpoint
page.Here I try using
local-web-server.js
It has
--spa
parameter.In the browser:
Thanks for miniserve!
The text was updated successfully, but these errors were encountered: