Skip to content
Njagi Mwaniki edited this page Mar 31, 2016 · 15 revisions

wai-devel

wai-devel is a development server for wai compliant haskell web applications.

Its name changed from yesod-devel (the haskell reddit community suggested this).

What wai-devel expects from your application

By default, wai-devel expects there to be a file named Application.hs with a function named develMain. You can specify a different file and function name with command line flags like so:

wai-devel -p YourFile.hs -f yourDevelFunc

However, you should look at https://github.com/urbanslug/wai-devel/wiki/PORT

Stack and Cabal-install

wai-devel works with with both stack and the cabal-install binary. Whichever you want to use.
Previously it was limited to use with stack only. This is no longer the case.

Compatible versions of GHC

Currently wai-devel is built and tested against:

  • GHC-7.8
  • GHC-7.10

File watching

wai-devel uses the the module you have chosen (e.g Application) to find the files to watch for changes in. It watches the files it imports and their Template Haskell dependencies as well as the cabal file.

Command line arguments

  • -r to turn off reverse proxying
  • -p Path to the file with the function you want to run defaults to Application.hs
  • -f The function you want to run defaults to develMain
  • -w A comma-separated list of directories which have files we want to watch for changes in.