#!/usr/bin/env perl use Dancer; use Data::Dumper; use App::TLSMe; use Proc::Fork qw( run_fork child ); my $http_port = 3001; my $https_port = 8080; set port => $http_port; set logger => 'console'; run_fork { child { App::TLSMe->new( listen => "0.0.0.0:${https_port}", backend => "0.0.0.0:${http_port}", method => "any", )->run; } }; get '/' => sub { return 'Is SSL working? :)'; }; post '/post_test' => sub { local $Data::Dumper::Indent = 0; debug 'Content-type: ' . request->content_type; debug 'Method used: ' . request->method; debug 'Body: ' . request->body; debug 'Body params: ' . Dumper( { params('body') } ); debug 'Query params: ' . Dumper( { params('query') } ); }; dance;