rknell / alfred

A performant, expressjs like server framework with a few gadgets that make life even easier.
Other
526 stars 29 forks source link

https support #120

Closed elliotPopina closed 1 year ago

elliotPopina commented 1 year ago

Hi, thank for this great package :)

I did not find in the doc the way to pass the requests in HTTPS. Is it supported ?

rknell commented 1 year ago

hey @elliotPopina - absolutely supports https, but this is probably not the recommended way to do it in production as you probably want something like nginx in front of the server so you can do load balancing etc. However it does work.

There is an example available here: https://github.com/rknell/alfred/blob/master/example/example_ssl.dart

Alfred is built very loosely on darts internal httpserver class from the dart:io library, so the docs there are probably worth a look if you get stuck as well: https://api.dart.dev/stable/3.0.6/dart-io/HttpServer-class.html