[erlang-questions] misultin question

Zsolt Czinkos <>
Mon Nov 7 18:43:46 CET 2011


Hi
Have a look at this:
http://code.google.com/p/misultin/wiki/ExamplesPage
and see "File support" section.
Misultin is a low level http server (compared to apache httpd),
youhave to implement your configuration methods if you need anything
like default root dir.
You can prefix your path like this:

RootDir = "/srv/http/root",Req:file( RootDir ++ RequestPath).
Where Request path is available via Req module functions. See link above.
Cheers,
czinkos
On Mon, Nov 7, 2011 at 6:05 PM, Wes James <> wrote:
> Anyone know with misultin, what is the "/" or root web folder if it
> does exist in a simple misultin web app. I.e., you can define a web
> page by doing this:
>
> handle_http(Req, Port) ->
>    % output
>    Req:ok([{"Content-Type", "text/html"}],
>
> ["<html>
> <head>
> </head>
> <body>
> </body>
> </html>
> "
> ]).
>
> But If I want to put some javascript in or css styles it seems I must
> put the whole css or javascript as a chunk in the [""] part.  Is there
> a way to put the css or javascript content in a file and pull in with:
>
> <script src="/jquery-1.6.4.js"></script>
> or
> <link rel="stylesheet" type="text/css" href="/file.css" />
>
> ??
>
> That is why I'm asking if there is a "/" or root web location defined
> to a basic misultin app.
>
> Thanks,
>
> -wes
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list