Skip to content

Conversation

ire4ever1190
Copy link

Closes #303

Example here can be accessed at http://[::1]:8080

import asyncdispatch, jester, os, strutils

router myrouter:
  get "/":
    resp "It's alive!"

proc main() =
  let port = 8080.Port
  let settings = newSettings(port=port, bindAddr="::1")
  var jester = initJester(myrouter, settings=settings)
  jester.serve()

main()

Does this by parsing the passed bindAddr and seeing if its a IPv4 or 6 address (defaults to IPv4)

Copy link
Owner

@dom96 dom96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support binding on IPv6 address

2 participants