packages feed

olwrapper 0.3.7.2 → 0.3.7.3

raw patch · 2 files changed

+30/−1 lines, 2 files

Files

olwrapper.cabal view
@@ -1,5 +1,5 @@ Name:           olwrapper-Version:        0.3.7.2+Version:        0.3.7.3 Synopsis:       An OpenLayers JavaScript Wrapper and Webframework with snaplet-fay Description:    test Author:         Thomas Edelmann@@ -28,6 +28,7 @@   other-modules:     Tutorial.OlApp     Tutorial.Traffic+    Site   other-extensions:       build-depends:            fay-base                  == 0.19.4.1  ,
+ src/Site.hs view
@@ -0,0 +1,28 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE PackageImports #-}++module Site ( app ) where++import               Data.ByteString     (ByteString)+import               Snap.Snaplet+import               Snap.Snaplet.Fay+import               Snap.Snaplet.Heist+import               Snap.Util.FileServe+import  "base"       Prelude++----------------------------------------------------------+import           Application++routes :: [(ByteString, AppHandler ())]+routes = [+           ("/fay",    with fay fayServe)+         , ("/static", serveDirectory "static")+         ]++app :: SnapletInit App App+app = makeSnaplet "app" "" Nothing $ do+    h <- nestSnaplet "" heist ( heistInit "templates" )+    f <- nestSnaplet "fay" fay initFay+    addRoutes routes+    return $ App h f