-
Notifications
You must be signed in to change notification settings - Fork 111
/
scotty-hello-world.hsfiles
60 lines (49 loc) · 1.32 KB
/
scotty-hello-world.hsfiles
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{-# START_FILE {{name}}.cabal #-}
name: {{name}}
version: 0.0.0
cabal-version: >= 1.8
build-type: Simple
executable {{name}}
hs-source-dirs: .
main-is: Main.hs
extensions: OverloadedStrings
build-depends: base >= 4 && < 5
, scotty >= 0.20.1
ghc-options: -Wall
-Wcompat
-Widentities
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wmissing-export-lists
-Wmissing-home-modules
-Wpartial-fields
-Wredundant-constraints
-O2
-threaded
-rtsopts
-with-rtsopts=-N
{-# START_FILE Main.hs #-}
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
main :: IO ()
main = scotty 3000 $ do
get "/:word" $ do
beam <- captureParam "word"
html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]
{-# START_FILE .ghci #-}
:set -XOverloadedStrings
{-# START_FILE .gitignore #-}
# GHC build artefacts
*.hi
*.o
# Haskell Tool Stack-related
.stack-work/
# Cabal-related
.cabal-sandbox
cabal.sandbox.config
# macOS related
.DS_Store
# Vim-related
*.swp
# keter package-related: https://hackage.haskell.org/package/keter
*.keter