{-# LANGUAGE OverloadedStrings #-}

------------------------------------------------------------------------------
-- | This module is where all the routes and handlers are defined for your
-- site. The 'app' function is the initializer that combines everything
-- together and is exported by this module.
module Site
  ( app
  ) where

------------------------------------------------------------------------------
import           Data.ByteString (ByteString)
import           Snap.Snaplet
------------------------------------------------------------------------------
import           Api.Core
import           Application

-- | The application's routes.
routes :: [(ByteString, Handler App App ())]
routes = []

------------------------------------------------------------------------------
-- | The application initializer.
app :: SnapletInit App App
app = makeSnaplet "app" "An snaplet example application." Nothing $ do
    api' <- nestSnaplet "api" api apiInit
    addRoutes routes
    return $ App api'
