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

Feature request: Option to rewrite paths to serve start-path #1

Open
rundis opened this issue Feb 26, 2016 · 0 comments
Open

Feature request: Option to rewrite paths to serve start-path #1

rundis opened this issue Feb 26, 2016 · 0 comments

Comments

@rundis
Copy link

rundis commented Feb 26, 2016

Firstly tx for a very handy npm lib.

Had a hard time coming up with a short description, so here's a bit of context:

  • I have a single page app using elm-transit-router
  • When navigating between pages it changes the browser-url according to how I set up routing

So a typical scenario in my sample app (https://github.com/rundis/albums):

  • elm-server Main.elm --output main.js --start-path index.html
  • I get an url like: http://localhost:3001
  • I navigate to an artist listing page and get a browser-url: http://localhost:3001/artists
  • I make a change in some elm file
  • elm-server recompiles as expected, but my browser does a get request to http://localhost:3001/artists
    which I suppose is fair play, but unfortunately that obviously results in a 404.

That sort of ruins the flow quite a bit. So it would be super awesome if there was some solution to handle this scenario. Maybe a glob-pattern to tell the server to serve (say index.html) for any url in the glob pattern ?

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