GithubHelp home page GithubHelp logo

Comments (9)

75lb avatar 75lb commented on June 26, 2024

which directory are you running ws from? the web_page folder?

from local-web-server.

micsun-al avatar micsun-al commented on June 26, 2024

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.

75lb avatar 75lb commented on June 26, 2024

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.

Thaina avatar Thaina commented on June 26, 2024

@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

  1. It should look for file web_page/iframe, if there is then serve as is
  2. If missing it should check if there is any folder web_page/iframe/
    2.1. If there is, redirect to web_page/iframe/ (add the trailing / for folder)
  3. If there is web_page/iframe/index.html then serve that file
  4. If there is web_page/index.html then serve that file
  5. If there is index.html then serve that file

Could we have this behaviour instead?

from local-web-server.

75lb avatar 75lb commented on June 26, 2024

from local-web-server.

Thaina avatar Thaina commented on June 26, 2024

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.

75lb avatar 75lb commented on June 26, 2024

from local-web-server.

Thaina avatar Thaina commented on June 26, 2024

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.

75lb avatar 75lb commented on June 26, 2024

from local-web-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.