Re: [Haskell-cafe] happstack file serving

2011-11-02 Thread Jeremy Shaw
On Tue, Nov 1, 2011 at 9:48 AM, Gary Klindt gary.kli...@googlemail.com wrote: Hello all, I want to have a web application using one 'index.html' file with ajax requests and a happstack web server which response to server requests. For that purpose I need to use some javascript libraries in my

[Haskell-cafe] happstack file serving

2011-11-01 Thread Gary Klindt
Hello all, I want to have a web application using one 'index.html' file with ajax requests and a happstack web server which response to server requests. For that purpose I need to use some javascript libraries in my directory tree. I tried: main = simpleHTTP nullConf $ msum [ serveFile

Re: [Haskell-cafe] happstack file serving

2011-11-01 Thread Antoine Latter
Hi Gary, A convention I use in my top-level handler is: simpleHTTP nullConf $ msum [ dynamic content handler , serveDirectory DisableBrowsing [] static , 404 handler ] where 'serveDirectory' is a function that ships with happstack-server and

Re: [Haskell-cafe] happstack file serving

2011-11-01 Thread Gary Klindt
Hey Antoine, thank you for answering. Your strategy is quite similar to the one I prefer. I misunderstood the behaviour of serveDirectory. The problem with external javascript files is solved. The other problem I had, was, that the argument 'msum' is a list, which has elements with the same

[Haskell-cafe] happstack file serving

2011-11-01 Thread Antoine Latter
Including list. -- Forwarded message -- From: Antoine Latter aslat...@gmail.com Date: Tue, Nov 1, 2011 at 11:33 AM Subject: Re: [Haskell-cafe] happstack file serving To: Gary Klindt gary.kli...@googlemail.com On Tue, Nov 1, 2011 at 11:24 AM, Gary Klindt gary.kli