Search code examples
perlmojolicious

How to configure morbo with https interface?


I am using Mojolicious for a web application.

Can I configure morbo with https interface?


Solution

  • You can start morbo with

     morbo -l 'https://*:3000' App.pl 
    

    to listen for https connections. You can also specify certificates like so:

     morbo -l 'https://*:3000?cert=certs/server.crt&key=certs/server.key&ca=certs/root.crt' App.pl 
    

    See https://docs.mojolicious.org/morbo