Any way to do it or is it planned?
It's recommended to add nginx proxy or similar as SSL termination, it's not performant enough in node.
+1 for this request.
For me serve has a use case of "quickly check something local in a browser". In that situation it's much better to have SSL built in, even if it's slow. When I'm working on a javascript SPA or a D3 visualisation, or I'm quickly looking over a site design for a colleague, I want a quick one-liner that works immediately -- I don't want to take the time to set up an nginx https proxy.
Maybe it's out of scope or more work than the devs want to do, but I think "it would be slower than nginx" isn't an argument against adding TLS/HTTPS to this tool.
@DanielBaird did you ever find something that would do SSL like serve? I need something to test Service Workers on my Jekyll site..
@mrmartineau Best so far is Caddy ( https://caddyserver.com ), where something like
sudo caddy -host myproject.com
...will start serving the current dir at myproject.com via http and https using a cert from letsencrypt.
@mrmartineau Do you need ssl just for localhost?
@DanielBaird thanks for the tip, I will give it a try.
@albinekb yes.
Both, I've been using firebase serve to do this but it is too complicated to setup for many projects.
I'm happy to accept a PR for this!
maybe a collaboration /merge would be great between the two of you guys.
I've been using this package until i've heard of "serve".
I've a semi-working branch for this and I'll try to submit a PR as soon as I sand off some of the rough edges. :slightly_smiling_face:
I struggled to get caddy to work. I ended up using http-server instead (npm install -g http-server)
Thank you so much @devinrhode2 , after a long day searching finally http-server worked well. 馃憤
Most helpful comment
+1 for this request.
For me
servehas a use case of "quickly check something local in a browser". In that situation it's much better to have SSL built in, even if it's slow. When I'm working on a javascript SPA or a D3 visualisation, or I'm quickly looking over a site design for a colleague, I want a quick one-liner that works immediately -- I don't want to take the time to set up an nginx https proxy.Maybe it's out of scope or more work than the devs want to do, but I think "it would be slower than nginx" isn't an argument against adding TLS/HTTPS to this tool.