Use the daemon command to start your Mojolicious application with an HTTP and WebSocket server using the Mojo::Server::Daemon backend. This is a core command available by default in Mojolicious applications.
Basic Usage
./myapp.pl daemon
Common Scenarios
Run in production mode on a specific port:
./myapp.pl daemon -m production -p -l http://*:8080
Listen on multiple interfaces (HTTP and HTTPS):
./myapp.pl daemon -l http://127.0.0.1:8080 -l https://[::]:8081
Use SSL with specific certificate and key files:
./myapp.pl daemon -l 'https://*:443?cert=./server.crt&key=./server.key'
Use a Unix domain socket:
./myapp.pl daemon -l http+unix://%2Ftmp%2Fmyapp.sock
Configure reverse proxy with trusted networks:
./myapp.pl daemon -l http://127.0.0.1:8080 -p 127.0.0.0/8 -p fc00::/7