Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow binding to IPv6 address #306

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

jester/request.nim Show resolved Hide resolved
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