--- Log opened Fri Jun 12 00:00:06 2009
05:35 < shu> hello
10:50 < deech_> Anyone here?
11:11 < dcoutts> deech_: the trick is to just ask
11:13 < deech_> Ok, thanks. I posted this on the Happs google group, so it might look familiar. I am using a javascript framework to manage the GUI, so happstack doesn
11:13 < deech_> 't generate any HTML.
11:14 < deech_> It only handles AJAX requests and throws up a default index.html page. I am having trouble setting up the handlers.
11:14 < deech_> And it is not using the MACID system.
11:15 < deech_> Currently I have something like this: appHandler :: ServerPartT IO Response
11:15 < deech_> appHandler =
11:15 < deech_>     msum [
11:15 < deech_>           dir "" (fileServe [] $  "Library/source/"),
11:15 < deech_>           methodM GET >> seeOther "" (toResponse ()),
11:15 < deech_>          ]
11:16 < deech_> The index.html is in "Library/source/", but it isn't seen.
11:21 < dcoutts> deech_: don't you need to list some files in fileServe, rather than [] ?
11:21  * dcoutts isn't really a happs expert
11:22 < dcoutts> deech_: ah, I remember
11:22 < deech_> Hmm, I thought that "index.html" got served up automatically. I will try this, thanks!
11:22 < dcoutts> actually come to think of it I've no idea what the first arg is :-)
11:22 < dcoutts> I thought for a moment it was the default, but then why is it a list?
11:23 < dcoutts> deech_: in the hackage-server I use:
11:23 < dcoutts> fileServe ["hackage.html"] static
11:23 < dcoutts> where static is the dir for the static html
11:23 < dcoutts> and there is no index.html there
11:23 < dcoutts> we use hackage.html for the default
11:24 < dcoutts> but I've no idea what it means to list several or none :-)
11:24 < dcoutts> have you looked at the docs?
11:24 < deech_> I just changed to 'dir "" (fileServe ["index.html"] $ "Library/source/")'. Same issue.
11:25 < deech_> fileServe does not come with any documentation.
11:25 < dcoutts> :-)
11:26 < dcoutts> why are you using dir "" ?
11:26 < dcoutts> that seems dubious to me
11:28 < deech_> That's so that it matches 'http://localhost:3000', and not 'http://localhost:3000/somedir'. I will try changing it.
12:00 < deech_> Is there any way to recursively open up a directory in happstack? In my case I have a Javascript GUI Framework in the root directory "Root". The relevant files are in different subdirectories of "Root" and they refer to each other. Is there any way to get Happstack to recursively allow access to all sub-directories?
12:05 < sm> deech_: working with qooxdoo ?
12:12 < deech_> sm: Yup
12:12 < deech_> How did you know?
12:13 < sm> I noticed your question on-list.. I had this working a while back, but had nothing that looked worth sharing
12:13 < sm> http://gist.github.com/128732 is code that was working for me, maybe gives some ideas
12:15 < deech_> Hmm.. So you are serving each individual directory and file.
12:16 < deech_> It doesn't seem like a lot of people use Javascript frameworks with Happstack. If they did there would be no need for the HTML generation mechanism.
12:16 < deech_> I wonder if any of the other frameworks are more Happstack-friendly.
12:18 < sm> that was with older happstack, there must be a better way to serve a directory (tree) now
--- Log closed Sat Jun 13 00:00:08 2009