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

Static directory (-s) serves index.html instead of Storybook #99

Closed
jeef3 opened this issue Apr 12, 2016 · 2 comments
Closed

Static directory (-s) serves index.html instead of Storybook #99

jeef3 opened this issue Apr 12, 2016 · 2 comments

Comments

@jeef3
Copy link
Contributor

jeef3 commented Apr 12, 2016

I have static images etc in a public directory, as well as my applications index.html. I want to make the images available to Storybook (as some are used in my components). However, when I supply the -s parameter to serve the static directory, my index.html is served up instead of the Storybook app.

Repro

  • Create a public directory in your app
  • Place a index.html in it
  • Start Storybook, providing ./public as the static dir: start-storybook -p 9001 -s ./public
  • Browser to http://localhost:9001

Browser displays index.html content instead of Storybook app.

@arunoda
Copy link
Member

arunoda commented Apr 12, 2016

Yes. This is valid. But, I'm not sure how to fix it.

I think best way is to remove index.html from the static directory.
Is it possible to make that file as something like index.html.tmpl.

Otherwise, I'm open some ways to fix this.
(May be changing the order of middlewares)

@arunoda arunoda added the bug label Apr 12, 2016
@jeef3
Copy link
Contributor Author

jeef3 commented Apr 12, 2016

Yeah, for now I have renamed my index.html 👍

jeef3 added a commit to jeef3/react-storybook that referenced this issue Apr 12, 2016
This switch prevents the static files from serving `index.html` as an
index. Fixes storybookjs#99.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants