dart-backend / angel

A polished, production-ready backend framework in Dart for the VM, AOT, and Flutter.
https://github.com/dukefirehawk/angel
BSD 3-Clause "New" or "Revised" License
171 stars 22 forks source link

add option to start server as HTTPS with SSL Certificate to Runner and to HotReloader #55

Open insinfo opened 2 years ago

insinfo commented 2 years ago

add option to start server as HTTPS with SSL Certificate to Runner and to HotReloader

add option here angel3_hot.dart line 206

 var server = _io = await HttpServer.bind(address ?? '127.0.0.1', port ?? 0);
    server.listen(handleRequest);
 var server = _io = HttpServer.bindSecure(address ?? '127.0.0.1',
                      port ?? 0,
                      backlog: 5,
                      certificateName: 'localhost_cert');

https://api.dart.dev/stable/2.16.1/dart-io/HttpServer-class.html#id_bindSecure https://github.com/dart-lang/sdk/blob/master/tests/standalone/io/https_server_test.dart

dukefirehawk commented 2 years ago

Are you using angel3_hot in production? Normally SSL is only needed in production and angel3_hot is for development. Would be great if you could provide your use case for using SSL with angel3_hot instead of angel3_production?