Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looks like a great development.

One thing I miss in Node.js is ability to run a HTTPS -server in a simple way without having to muddle with generating & installing a correct type of certificate. I understand there can be a "self-signed certificate" but there doesn't seem to be any npm-module I could install to take care of that.

Since Bun is a "server-side" JavaScript platform it would be great if it could support https out of the box too.



Does this work? https://get.localhost.direct/

No need to mess with self signed certs, there are already some public 127.0.0.1 wildcard domains like the one I linked.


caddy supports self signed certs by default

https://caddyserver.com/docs/automatic-https


More precisely, it runs its own local CA to issue certs for itself. Not exactly the same as self-signed certs (which is a cert whose key was used to sign itself), but better because leaf certs are short-lived and easily cycled. This allows for setting up trust easily, just need to trust the one root CA cert and every leaf cert for any domain served will be trusted.


Does it work with Node.js or Bun or Deno?


You can proxy to internal services with a few lines of config....

  :2080

  reverse_proxy :9000
Then access https://localhost:2080 and you'll be accessing whatever is on port 9000, be it node or bun or anything else.

https://caddyserver.com/docs/quick-starts/reverse-proxy


Curious how do you actually see this working. Care to elaborate?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: