packages feed

happs-tutorial (empty) → 0.0

raw patch · 4 files changed

+65/−0 lines, 4 filesdep +HAppS-Datadep +HAppS-Serverdep +HAppS-Statesetup-changed

Dependencies added: HAppS-Data, HAppS-Server, HAppS-State, HStringTemplate, base, bytestring, containers, mtl

Files

+ LICENSE view
@@ -0,0 +1,31 @@+Copyright Author Name 2008++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++    * Redistributions of source code must retain the above copyright+      notice, this list of conditions and the following disclaimer.++    * Redistributions in binary form must reproduce the above+      copyright notice, this list of conditions and the following+      disclaimer in the documentation and/or other materials provided+      with the distribution.++    * Neither the name of Author Name nor the names of other+      contributors may be used to endorse or promote products derived+      from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+
+ Setup.lhs view
@@ -0,0 +1,3 @@+#!/usr/bin/env runhaskell+> import Distribution.Simple+> main = defaultMain
+ happs-tutorial.cabal view
@@ -0,0 +1,16 @@+name:                happs-tutorial+version:             0.0+build-type:          Simple+synopsis:            A HAppS Tutorial that is is own demo+description:         A nice way to learn how to build web sites with HAppS+category:            Web+license:             BSD3+license-file:        LICENSE+author:              Thomas Hartman+maintainer:          thomashartman1 at gmail dot com+build-Depends:       base >= 3, HStringTemplate >= 0.3.1, mtl >= 1.1.0.1, bytestring >= 0.9.0.1.1,+                     HAppS-Server >= 0.9.2.1, HAppS-Data >= 0.9.2.1, HAppS-State >= 0.9.2.1,+		     containers >= 0.1.0.2+executable:          happs-tutorial+main-is:             Main.hs+Hs-source-dirs:      src
+ src/Main.hs view
@@ -0,0 +1,15 @@+-- with gracious thanks to mightybyte:+-- http://softwaresimply.blogspot.com/2008_02_01_archive.html++module Main where+import HAppS.Server+import Model+import Controller+import Misc++main = do+  let p = 5001 +  startSystemState entryPoint -- start the HAppS state system+  putStrLn $ "starting on port " ++ (show p)+  simpleHTTP (Conf {port=p}) controller -- start serving web pages+