Commits

Bryan O'Sullivan committed f0d33cc

Rename ping servers

  • Participants
  • Parent commits c5762fe

Comments (0)

Files changed (9)

http-load-tester.cabal

 cabal-version:       >=1.8
 extra-source-files:  
     README.markdown
-    servers/snap/ping-server-snap.cabal
-    servers/snap/src/*.hs
+    servers/ping/ping-servers.cabal
+    servers/ping/src/*.hs
 
 flag developer
   description: operate in developer mode

servers/ping/ping-servers.cabal

+Name:                ping-server-snap
+Version:             0
+Build-type:          Simple
+Cabal-version:       >=1.2
+
+Executable ping-server-snap
+  hs-source-dirs: src
+  main-is: Main.hs
+
+  Build-depends:
+    base >= 4 && < 5,
+    bytestring >= 0.9.1 && < 0.10,
+    snap == 0.5.*,
+    snap-core == 0.5.*,
+    snap-server == 0.5.*
+
+  ghc-options: -rtsopts -threaded -Wall

servers/ping/src/Application.hs

+module Application
+  ( Application
+  , applicationInitializer
+  ) where
+
+import           Snap.Extension
+
+type Application = SnapExtend ApplicationState
+
+type ApplicationState = ()
+
+applicationInitializer :: Initializer ApplicationState
+applicationInitializer = return ()

servers/ping/src/Main.hs

+import Snap.Extension.Server
+import Application
+import Site
+
+main :: IO ()
+main = quickHttpServe applicationInitializer site

servers/ping/src/Site.hs

+{-# LANGUAGE OverloadedStrings #-}
+
+module Site (site) where 
+
+import Application
+
+site :: Application ()
+site = return ()

servers/snap/ping-server-snap.cabal

-Name:                ping-server-snap
-Version:             0
-Build-type:          Simple
-Cabal-version:       >=1.2
-
-Executable ping-server-snap
-  hs-source-dirs: src
-  main-is: Main.hs
-
-  Build-depends:
-    base >= 4 && < 5,
-    bytestring >= 0.9.1 && < 0.10,
-    snap == 0.5.*,
-    snap-core == 0.5.*,
-    snap-server == 0.5.*
-
-  ghc-options: -rtsopts -threaded -Wall

servers/snap/src/Application.hs

-module Application
-  ( Application
-  , applicationInitializer
-  ) where
-
-import           Snap.Extension
-
-type Application = SnapExtend ApplicationState
-
-type ApplicationState = ()
-
-applicationInitializer :: Initializer ApplicationState
-applicationInitializer = return ()

servers/snap/src/Main.hs

-import Snap.Extension.Server
-import Application
-import Site
-
-main :: IO ()
-main = quickHttpServe applicationInitializer site

servers/snap/src/Site.hs

-{-# LANGUAGE OverloadedStrings #-}
-
-module Site (site) where 
-
-import Application
-
-site :: Application ()
-site = return ()