NAME

Developer::Dashboard::Web::Server - PSGI server bridge for Developer Dashboard

SYNOPSIS

my $server = Developer::Dashboard::Web::Server->new(app => $app);
$server->run;

DESCRIPTION

This module reserves the local listen address, builds the Dancer2 PSGI app, and runs it under Starman through Plack::Runner.

METHODS

new, run, start_daemon, listening_url, serve_daemon, psgi_app, _build_runner, _default_headers, generate_self_signed_cert, get_ssl_cert_paths

Construct and run the local PSGI web server with optional SSL/HTTPS support.

When ssl = 1> is passed to new(), generates self-signed certificates in ~/.developer-dashboard/certs/ and configures Starman for HTTPS. The listening_url() method returns https:// when SSL is enabled.

SSL SUPPORT

Pass ssl = 1> to the new() constructor to enable HTTPS:

my $server = Developer::Dashboard::Web::Server->new(
    app => $app,
    ssl => 1,
);
$server->run;

Self-signed certificates are generated automatically in ~/.developer-dashboard/certs/ and reused on subsequent runs.