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

How can i correctly return static files #108

Open
0xAX opened this issue Jan 3, 2013 · 1 comment
Open

How can i correctly return static files #108

0xAX opened this issue Jan 3, 2013 · 1 comment

Comments

@0xAX
Copy link

0xAX commented Jan 3, 2013

Hello,

I have standard erlang directory structure. In priv directory i have js dir with javascript files and index.html - main page.

I started misultin:

misultin:start_link([{port, 2000}, {static, "/home/user/testproject/priv/"},
{loop, fun(Req) -> handle_http(Req) end}]),

Now what i must write in handle_http to return index.html with correctly loaded js files?

Thank you.

@dongyuwei
Copy link

just visit http://127.0.0.1:2000/static/index.html, it should work. The path must start with /static/.

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

2 participants