Comments (9)
which directory are you running ws
from? the web_page
folder?
from local-web-server.
I am running ws from the parent of "web_page".
There are multiple pages I'm testing and "web_page" is one of them.
from local-web-server.
if you running this command from the parent of "web_page", it will look for the file "index.html" in the same directory.. ws
serves the directory it is run from ..
from local-web-server.
@75lb I think the default behaviour of the common static spa server is looking for nearest parent index.html
of the url first. Which means with --spa
command, it should serve localhost:8000/web_page/iframe
with "localhost:8000/web_page/iframe/index.html"
Actually for full step, with this author's setup. given that the request is localhost:8000/web_page/iframe
- It should look for file
web_page/iframe
, if there is then serve as is - If missing it should check if there is any folder
web_page/iframe/
2.1. If there is, redirect toweb_page/iframe/
(add the trailing/
for folder) - If there is
web_page/iframe/index.html
then serve that file - If there is
web_page/index.html
then serve that file - If there is
index.html
then serve that file
Could we have this behaviour instead?
from local-web-server.
from local-web-server.
you specify which html file should be served as the SPA.. does that solve your issue?
It's not. Because then when I go to localhost:8000
it then still try to serve src/iframe/index.html
instead of src/index.html
As I said, common spa static server, firebase for example, will always recursively look for the spa
file of the parents recursively. This behaviour let we host multiple app in each subdirectory
from local-web-server.
from local-web-server.
Thank you for your explanation. Still I would like to beg for you to consider this behaviour as default of the plugin so that it not confused and could be loaded from npm
from local-web-server.
from local-web-server.
Related Issues (20)
- How can I replace body content using a middleware? HOT 10
- Spa per folder HOT 5
- Rewrite rules stopped working from npx on Windows HOT 10
- How to enable verbose option while using API of lws? HOT 2
- Server has no output when executed by node exec() HOT 3
- what's going on here? HOT 1
- Cannot consume package from TypeScript HOT 7
- Nodejs version not compatible: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: HOT 1
- Support Range Requests HOT 2
- How to change default 8000 port to another custom one ? HOT 1
- Custom 404 page HOT 1
- Output doesn't show the localhost and 192.168.xxx.xxx HOT 3
- Rewrite wildcard does not create the match HOT 3
- Override config file arguments from CLI HOT 1
- Middleware error HOT 2
- Server shuts down HOT 4
- Cannot find the port when running in docker HOT 3
- SyntaxError: Unexpected identifier HOT 1
- Allow passing more server options through lws.config.js
- auto reload? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from local-web-server.