homepage: https://github.com/hiratara/hs-server-starter
changelog-type: ''
hash: 593cf76269d6105a787ce72d5adc4e68ec14702357cb3f15094530e59091ba74
test-bench-deps:
  unix: -any
  base: -any
  network: -any
  HUnit: -any
  hs-server-starter: -any
  temporary: -any
maintainer: hiratara@cpan.org
synopsis: Write a server supporting Server::Starter's protocol in Haskell
changelog: ''
basic-deps:
  warp: -any
  wai: -any
  base: ! '>=4.7 && <5'
  network: ! '>=2.6.3.1 && <2.7'
  hs-server-starter: -any
  http-types: -any
  directory: -any
all-versions:
- '0.1.0.0'
author: Masahiro Honma
latest: '0.1.0.0'
description-type: markdown
description: ! "hs-server-starter\n=============\n\n## Description\n\nProvides a utility
  to write server program which can be called via Perl's\n[https://github.com/kazuho/p5-Server-Starter](start_server)
  program using\nHaskell.\n\nThis module does not provide a Haskell implementation
  of `start_server`,\nso you need to use the original Perl version or use\n[a version
  ported to golang](https://github.com/lestrrat/go-server-starter).\n\n## SINOPSIS\n\nSince
  the `listenAll` function returns a listened `Network.Socket`, please call\n`accept`
  on it.\n\n```haskell\nimport qualified Network.ServerStarter.Socket as Starter\nimport
  qualified Network.Socket               as Socket\nimport qualified Network.Wai                  as
  Wai\nimport qualified Network.Wai.Handler.Warp     as Warp\n\nmain :: IO ()\nmain
  = do\n  (socket:_) <- Starter.listenAll\n  Socket.SockAddrInet port _ <- Socket.getSocketName
  socket\n  let setting = Warp.setPort (fromEnum port)\n              $ Warp.defaultSettings\n
  \ Warp.runSettingsSocket setting socket app\n\napp :: Wai.Application\napp = ...\n```\n\nThen
  run `start_server` and access to `http://localhost:12345` .\n\n```\n$ start_server
  --port 12345 -- stack exec server-starter-warp-example\n```\n\n## Author\n\nMasahiro
  Honma (<hiratara@cpan.org>)\n"
license-name: BSD3

Update from Hackage at 2017-03-18T06:52:51Z
Update from Hackage at 2017-03-18T06:52:51Z
