Yume 練功地

偷偷練

Yesod

haskell http lib

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 安裝 Yesod 相關
stack install yesod-bin cabal-install –-install-ghc
stack build yesod-bin cabal-install --install-ghc

建立 Yesod 專案,接著輸入專案名稱,跟 DB 類型
# YumeYesod
# mini
# stack exec yesod init
# stack exec -- yesod init --bare --name YumeYesod --database mini && stack init
# stack templates 可以用這個指令看有哪些 templates 可用
stack new my-project yesod-sqlite && cd my-project
stack new YumeYesod yesod-sqlite && cd YumeYesod
stack new YumeYesod yesod-minimal && cd YumeYesod



cd YumeYesod

# Create stack.yaml
stack init

# build lib
stack build
# Launch devel server
stack exec -- yesod devel

yesod add-handler
Echo
/echo/#String
GET

http://asdfblog.com/haskell-web-programming-a-yesod-tutorial.html
http://www.jianshu.com/p/605042ea7c16
https://ilikewhenit.works/blog/1
https://www.fpcomplete.com/blog/2015/08/new-in-depth-guide-stack