Running two instances of `yesod devel` at the same time with different ports?

Skip to first unread message

Yifan Yu

May 24, 2016, 8:54:20 AM5/24/16
to Yesod Web Framework

Previously I could run two instances of `yesod devel` at the same time by setting different ports with "-p". However, after HTTPS was added to `yesod devel`, it seems that there is no command line option to modify the default 3443 port for HTTPS. So when I run the second instance of `yesod devel`, it exits with “bind: resource busy (Address already in use)”. Is there a way to workaround this?


Michael Snoyman

May 24, 2016, 9:52:11 AM5/24/16
to Yesod Web Framework
The --tls-port or -q options should work for this:

-q,--tls-port N          Devel server listening port (tls)

You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Yifan Yu

May 24, 2016, 3:42:56 PM5/24/16
It works like a charm! Thank you.

Is it possible to get a list of options for yesod commands? `yesod devel --help` only gives the info for the `yesod` command itself.

Michael Snoyman

May 24, 2016, 11:55:36 PM5/24/16
It seems to work for me:

$ yesod devel --help

Usage: yesod devel [-d|--disable-api] [-s|--success-hook COMMAND]

                   [-f|--failure-hook COMMAND] [-t|--event-timeout N]

                   [-b|--builddir ARG] [-i|--ignore DIR]

                   [-e|--extra-cabal-arg ARG] [-p|--port N] [-q|--tls-port N]

                   [-x|--proxy-timeout N] [-n|--disable-reverse-proxy]


  Run project with the devel server

Available options:

  -d,--disable-api         Disable fast GHC API rebuilding

  -s,--success-hook COMMAND

                           Run COMMAND after rebuild succeeds

  -f,--failure-hook COMMAND

                           Run COMMAND when rebuild fails

  -t,--event-timeout N     Force rescan of files every N seconds (default 10,

                           use -1 to rely on FSNotify alone)

  -b,--builddir ARG        Set custom cabal build directory, default `dist'

  -i,--ignore DIR          ignore file changes in DIR

  -e,--extra-cabal-arg ARG pass extra argument ARG to cabal

  -p,--port N              Devel server listening port

  -q,--tls-port N          Devel server listening port (tls)

  -x,--proxy-timeout N     Devel server timeout before returning 'not ready'

                           message (in seconds, 0 for none)


                           Disable reverse proxy

  -c,--interrupt-only      Disable exiting when enter is pressed

Yifan Yu

May 25, 2016, 12:45:42 AM5/25/16
This is what I got:

root@localhost:~/stack/iped# stack exec -- yesod version
yesod-bin version:
root@localhost:~/stack/iped# stack exec -- yesod devel --help
Yesod Web Framework command line utility

Usage: yesod [-d|--dev] [-v|--verbose] COMMAND

Available options:
  -h,--help                Show this help text
  -d,--dev                 use cabal-dev
  -v,--verbose             More verbose output

Available commands:
  init                     Command no longer available, please use 'stack new'
  hsfiles                  Create a hsfiles file for the current folder
  configure                Configure a project for building
  build                    Build project (performs TH dependency analysis)
  touch                    Touch any files with altered TH dependencies but do
                           not build
  devel                    Run project with the devel server
  test                     Build and run the integration tests
  add-handler              Add a new handler and module to the project.
                           Interactively asks for input if you do not specify
  keter                    Build a keter bundle
  version                  Print the version of Yesod

I tried on version 1.4.14 and it works correctly.

Michael Snoyman

May 25, 2016, 1:45:36 AM5/25/16
This appears to be a regression in optparse-applicative, as I was able to bisect this change in behavior to:

commit e7c6d06d3dca7710b6bad2caa074162170b82a78

Author: Michael Snoyman <>

Date:   Sun Mar 13 08:26:31 2016 +0200

    Newer LTS release

Which involved no code change within yesod-bin.

I've just pushed a commit to master which seems to fix this. Once Travis gives the green light, I can release it to Hackage.

Reply all
Reply to author
0 new messages