Skip to content

Instantly share code, notes, and snippets.

@fujimura
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fujimura/b78f6e322dd4a22480bd to your computer and use it in GitHub Desktop.
Save fujimura/b78f6e322dd4a22480bd to your computer and use it in GitHub Desktop.
name: app
version: 0.0.0.1
synopsis: stuck
description: stuck
license: BSD3
license-file: LICENSE
author: Daisuke Fujimura
maintainer: me@fujimuradaisuke.com
copyright: (c) 2014 Daisuke Fujimura
category: Web
build-type: Simple
cabal-version: >=1.8
Executable app
main-is:
Main.hs
ghc-options:
-Wall
build-depends:
base >= 4.0 && < 5.0
, http-types
, wai >= 3.0.0
, wai-extra >= 3.0.0
, warp
{-# LANGUAGE OverloadedStrings #-}
import Network.Wai
import Network.HTTP.Types
import Network.Wai.Handler.Warp (run)
app :: Application
app _ respond = do
respond $ responseLBS
status200
[("Content-Type", "text/plain")]
"Hello, Web!"
main :: IO ()
main = do
run 8080 app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment