yesod/yesod
Maximilian Tagher a1c6bc553c Update yesod cabal file for distribution
Hackage is now requiring a higher cabal file version, and with that comes a requirement to specify the language of each module
2020-06-26 13:01:43 -04:00
..
Yesod/Default Merge pull request #1658 from v0d1ch/1655_Replace-decodeFile-with-decodeFileEither 2020-06-26 12:52:32 -04:00
.gitignore Add 'yesod/' from commit '45bbb0fc93db341ecac1406234fe0e880d63ed12' 2011-07-22 08:59:52 +03:00
ChangeLog.md Bump yesod to 1.6.0.2 2020-06-26 12:55:43 -04:00
LICENSE Update license with MIT license 2012-04-29 09:38:45 +03:00
README.md Add Getting Started to READMEs 2019-11-11 13:46:27 +01:00
Setup.lhs Add 'yesod/' from commit '45bbb0fc93db341ecac1406234fe0e880d63ed12' 2011-07-22 08:59:52 +03:00
yesod.cabal Update yesod cabal file for distribution 2020-06-26 13:01:43 -04:00
Yesod.hs Move some Yesod exports to Yesod.Core 2013-06-06 10:05:22 +03:00

yesod

The yesod package groups together the various Yesod related packages into one cohesive whole. This is the "battery loaded" version of Yesod, whereas most of the core code lives in yesod-core.

For the yesod executable, see yesod-bin.

Yesod is fully documented on its website.

Getting Started

Learn more about Yesod on its main website. If you want to get started using Yesod, we strongly recommend the quick start guide, based on the Haskell build tool stack.

Here's a minimal example!

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

import Yesod

data App = App -- Put your config, database connection pool, etc. in here.

-- Derive routes and instances for App.
mkYesod "App" [parseRoutes|
/ HomeR GET
|]

instance Yesod App -- Methods in here can be overridden as needed.

-- The handler for the GET request at /, corresponds to HomeR.
getHomeR :: Handler Html
getHomeR = defaultLayout [whamlet|Hello World!|]

main :: IO ()
main = warp 3000 App

To read about each of the concepts in use above (routing, handlers, linking, JSON), in detail, visit Basics in the Yesod book.