Add static example

This commit is contained in:
Rashad Gover 2022-09-01 05:49:18 +00:00
parent 60c8660117
commit 220d7725da
3 changed files with 52 additions and 0 deletions

6
examples/static/Main.hs Normal file
View File

@ -0,0 +1,6 @@
module Main where
import qualified Okapi
main :: IO ()
main = Okapi.run id Okapi.static

View File

@ -137,6 +137,43 @@ executable sse-exe
, websockets
default-language: Haskell2010
executable static-exe
main-is: Main.hs
other-modules:
Paths_okapi
hs-source-dirs:
examples/static
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
aeson >=1.4.7
, attoparsec
, base >=4.7 && <5
, base64
, bytestring
, containers
, cookie
, cryptonite
, extra
, http-api-data
, http-types
, memory
, mmorph
, mtl
, network
, okapi
, parser-combinators
, text
, transformers
, unagi-chan
, vault
, wai
, wai-extra
, wai-websockets
, warp
, warp-tls
, websockets
default-language: Haskell2010
executable todo-exe
main-is: Main.hs
other-modules:

View File

@ -134,6 +134,15 @@ executables:
- slave-thread
- time
- bytestring
static-exe:
main: Main.hs
source-dirs: examples/static
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- okapi
tests:
okapi-test: