yesod/yesod
Chris Done 4a6aedf88a Add Getting Started to READMEs
* Adds to the README seen on Github.
* Adds to the README that will be seen on Stackage/Hackage.
2019-11-11 13:46:27 +01:00
..
Yesod/Default Merge branch 'better-monads' into no-transformers 2018-01-17 06:43:52 +02:00
.gitignore Add 'yesod/' from commit '45bbb0fc93db341ecac1406234fe0e880d63ed12' 2011-07-22 08:59:52 +03:00
ChangeLog.md Version bumps and changelog updates 2018-01-15 15:57:36 +02: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 deleted: unneed cabal build-depends by weeder 2018-06-09 13:15:21 +09: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.