linemanjs / lineman

Lineman helps you build fat-client JavaScript apps. It produces happiness by building assets, mocking servers, running specs on every file change
MIT License
1.18k stars 83 forks source link

Listen for both http and https with `lineman run` #310

Open pebcakerror opened 9 years ago

pebcakerror commented 9 years ago

Referencing issue #309.

This is a simple way to handle https during development. It will listen for https traffic along side http traffic via a configurable port.

searls commented 9 years ago

@jasonkarns @davemo either of you have a chance to review / test this a bit? The impact is hard to read for me b/c of the indent shift

searls commented 9 years ago

Okay, reviewing:

The last step just hangs forever.

Is there anything you can do to make it redirect if you hit the app on the HTTPS port to redirect to the https protocol?

pebcakerror commented 9 years ago

Right because https and http listen on different ports but both are configurable.

http defaults to 8443 as you've seen. http still defaults to 8000 as it did before.

searls commented 9 years ago

Right, I realize that, but if someone wants to hit the https version of the page and they lazily type in localhost:8443 into their browser's address bar, they would expect that it would automatically redirect them to the correct protocol and not hang forever on http

pebcakerror commented 9 years ago

Ahhh, I see what you're saying. I can look into that.

Do you think this PR still adds a measurable improvement and could be merged before adding a redirect enhancement?

searls commented 9 years ago

Yeah, probably, but I do worry about the silly support issues the redirect thing will elicit.

I am also worried about what speed and memory overhead this introduces, since it's always on

pebcakerror commented 9 years ago

Heh, Yea, I thought about that too. What do you think about an 'enableHttps' option?

searls commented 9 years ago

+1 for an opt-in option

On Thu, Aug 14, 2014 at 12:38 PM, Jonathan Worent notifications@github.com wrote:

Heh, Yea, I thought about that too. What do you think about an 'enableHttps' option?

Reply to this email directly or view it on GitHub: https://github.com/linemanjs/lineman/pull/310#issuecomment-52208176

searls commented 9 years ago

Was this obviated by #352?

jasonkarns commented 9 years ago

I think this would still be necessary. #352, afaict, only enables proxied requests to hit an https endpoint. It doesn't make lineman's server listen for https traffic.