[No Ph.D. Needed. thomashartman1@gmail.com**20080615004832] addfile ./runServer.sh hunk ./runServer.sh 1 +time ghc -isrc --make src/Main.hs; ./src/Main hunk ./src/Main.hs 58 - [ exactdir "login" loginSPs + [ (exactdir "" [withTemplate "index" id] ) + , (exactdir "basic-url-handling" [withTemplate "basic-url-handling" id] ) + + + , exactdir "login" loginSPs hunk ./src/Main.hs 67 - , (exactdir "" [withTemplate "index" id] ) + + hunk ./src/Main.hs 73 - , exactdir "exactdirdemo" [ msgToSp "exactdir match. subpages will fail" ] + , exactdir "exactdirdemo" [ msgToSp "Your request matched the exactdir request handler" ] + , dir "src" [ fileServe [] "src" ] hunk ./src/Main.hs 76 + addfile ./templates/basic-url-handling.st hunk ./templates/basic-url-handling.st 1 - +

Get started learning how basic url handling in HAppS works.

+ + + +

Urls:

+ + +

put your css/images/static html under "static" directory

+ +

this doesn't match anything, because exactdir doesnt allow subpaths

+

(but subpages will work for dir)

+

a css file in the "static" directory

hunk ./templates/getstarted.st 1 -

Get started learning how basic url handling in HAppS works -
1) click the urls below, -
2) read the source code of the "impl" function in Main.hs to see how urls are handled in HApps +

Haskell is a great way to program.

hunk ./templates/getstarted.st 3 +

And HAppS is a great way to build web applications.

+ +

Unfortunately, the HAppS documentation has been sorely lacking. At times it has seemed to me that even something as trivial as "hello world" took a PhD in HAppSology.

+ +

I created this tutorial to prove that this isn't so, and to popularize the use of my favorite language, haskell, in web applications.

+ +

If you use Ruby on Rails, Django, Perl Catalyst, PHP, or some other popular web framework, but +dabble in haskell and would like to use the worlds greatest language for your next web project, +this tutorial will give you all the knowledge you need.

+ +

No Ph.D. Needed. TM

+ + + +

Start The Tutorial.

hunk ./templates/getstarted.st 19 -

put your css/images/static html under "static" directory

-

http://localhost:5001/list

-

http://localhost:5001/list/whatever

-

this doesn't match anything, because exactdir doesnt allow subpaths

-

(but subpages will work for dir)

-

a css file in the "static" directory