Main.hs 518 B

123456789101112131415161718192021222324
  1. {-# LANGUAGE MultiParamTypeClasses #-}
  2. {-# LANGUAGE QuasiQuotes #-}
  3. {-# LANGUAGE TemplateHaskell #-}
  4. {-# LANGUAGE TypeFamilies #-}
  5. import AppCache
  6. import Routes
  7. import Yesod.Core
  8. instance Yesod App
  9. mkYesodDispatch "App" resourcesApp
  10. getHomeR :: Handler String
  11. getHomeR = return "Hello"
  12. getSomethingR :: Handler String
  13. getSomethingR = return "Hello"
  14. getAppCacheR :: Handler AppCache
  15. getAppCacheR = $(appCache resourcesApp)
  16. main :: IO ()
  17. main = warp 3000 App