Skip to content

add support for server.address() #28

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

Closed
srghma opened this issue Apr 23, 2020 · 2 comments
Closed

add support for server.address() #28

srghma opened this issue Apr 23, 2020 · 2 comments
Labels
type: enhancement A new feature or addition.

Comments

@srghma
Copy link

srghma commented Apr 23, 2020

there is already support for this method in https://github.com/purescript-node/purescript-node-net/blob/1fd91c872ecff202ae86b848f2c8d054f7a751f3/src/Node/Net/Server.purs#L72-L88

string means ICP or pipe of socket

http.server inherits from net.server

https://nodejs.org/api/http.html#http_class_http_server

the question is can it return String if server is created using purescript-node-http?

i.e. should it be

address :: Server -> Effect (Maybe (Either Address String))

or

address :: Server -> Effect (Maybe Address)
@srghma
Copy link
Author

srghma commented Apr 23, 2020

oh, yes, it can, we support sockets

foreign import listenSocket :: Server -> String -> Effect Unit -> Effect Unit

srghma added a commit to srghma/purescript-node-http that referenced this issue Apr 23, 2020
srghma added a commit to srghma/purescript-node-http that referenced this issue Apr 23, 2020
srghma added a commit to srghma/purescript-node-http that referenced this issue Apr 23, 2020
@JordanMartinez JordanMartinez added the type: enhancement A new feature or addition. label Dec 7, 2021
@JordanMartinez
Copy link
Contributor

Fixed by #49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A new feature or addition.
Projects
None yet
Development

No branches or pull requests

2 participants