Compare commits
3 Commits
cf855b9bef
...
9b7a19f4d2
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b7a19f4d2 | |||
| b26291d014 | |||
| 4a9a405310 |
@ -7,8 +7,13 @@ This project is my attempt to learn the Haskell programming language and build a
|
||||
* `cabal init`
|
||||
* `cabal run`
|
||||
* `cabal build`
|
||||
* `cabal freeze`
|
||||
* `cabal install --only-dependancies`
|
||||
|
||||
### Packages
|
||||
|
||||
* [Scotty](https://hackage.haskell.org/package/scotty)
|
||||
|
||||
## Links
|
||||
|
||||
* [adit.io - Making A Website With Haskell](https://www.adit.io/posts/2013-04-15-making-a-website-with-haskell.html)
|
||||
|
||||
@ -1,4 +1,9 @@
|
||||
module Main where
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
|
||||
import Web.Scotty
|
||||
|
||||
main :: IO ()
|
||||
main = putStrLn "Hello, Haskell!"
|
||||
main = scotty 3000 $
|
||||
get "/:word" $ do
|
||||
beam <- pathParam "word"
|
||||
html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]
|
||||
@ -68,7 +68,9 @@ executable portfolio-haskell
|
||||
-- other-extensions:
|
||||
|
||||
-- Other library packages from which modules are imported.
|
||||
build-depends: base ^>=4.17.2.1
|
||||
build-depends: base ^>=4.17.2.1 && <5
|
||||
, scotty >= 0.22 && < 0.23
|
||||
, text
|
||||
|
||||
-- Directories containing source files.
|
||||
hs-source-dirs: app
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user