The yesod-gitrev package

[Tags:bsd3, library]

[Skip to Readme]

Properties

Versions 0.1.0.0
Dependencies aeson, base (==4.*), gitrev, template-haskell, yesod-core [details]
License BSD3
Copyright 2015 FP Complete Corporation
Author Dan Burton
Maintainer danburton.email@gmail.com
Uploaded Tue Apr 28 04:44:27 UTC 2015 by DanBurton
Distributions LTSHaskell:0.1.0.0, NixOS:0.1.0.0, Stackage:0.1.0.0, Tumbleweed:0.1.0.0
Downloads 218 total (5 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2015-05-21 [all 2 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for yesod-gitrev

Readme for yesod-gitrev-0.1.0.0

A subsite for displaying git information.

You can use the gitRev splice (or tGitRev typed splice) to generate a value of type GitRev. Put this in your app's foundation, add a route to the subsite, and you're good to go.

See [Haskell and Yesod > Creating a Subsite] (http://www.yesodweb.com/book/creating-a-subsite) for details on how Yesod subsites work.

-- examples/Main.hs

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes       #-}
{-# LANGUAGE TemplateHaskell   #-}
{-# LANGUAGE TypeFamilies      #-}

import Yesod
import Yesod.GitRev

data Master = Master
  { getGitRev :: GitRev
  }

mkYesod "Master" [parseRoutes|
/build-version GitRevR GitRev getGitRev
|]

instance Yesod Master

main = warp 3000 $ Master $$(tGitRev)