Skip to content

Commit

Permalink
Spike beginning of server
Browse files Browse the repository at this point in the history
  • Loading branch information
GetContented committed Nov 13, 2016
1 parent 0e0dd76 commit 2f62082
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Main where

import Lib
import qualified Lib

main :: IO ()
main = someFunc
main = Lib.startServer
Empty file added log/.keep
Empty file.
8 changes: 5 additions & 3 deletions src/Lib.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module Lib
( someFunc
( startServer
) where

someFunc :: IO ()
someFunc = putStrLn "someFunc"
import qualified Server

startServer :: IO ()
startServer = Server.startServer
15 changes: 15 additions & 0 deletions src/Server.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{-# Language OverloadedStrings #-}

module Server
( startServer
) where

import Snap (Snap, writeBS, quickHttpServe)


startServer :: IO ()
startServer = quickHttpServe site

site :: Snap ()
site =
writeBS "Server now serving basic text for breakfast!"
1 change: 1 addition & 0 deletions substance.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ executable substance-exe
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, substance
, snap
default-language: Haskell2010

test-suite substance-test
Expand Down

0 comments on commit 2f62082

Please sign in to comment.