http://www.perlmonks.org?node_id=11131892


in reply to Re^13: Need to know the process to implement perl script into web application server.
in thread Need to know the process to implement perl script into web application server.

Currently the webapp running in http but i would like to enable SSL in order to run the webapp in https protocol

I have tried below but getting below error

C:\Users\Documents\Perl\webapp\bin>plackup --enable-ssl --ssl-key-file +=C:\Users\Documents\Private-Public\privateKey.key --ssl-cert-file=C:\ +Users\Documents\Private-Public\certificate.crt app.psgi

failed to listen to port 5000: Invalid argument at C:/Strawberry/perl/site/lib/HTTP/Server/PSGI.pm line 103.

Please check i have installed the following module as well Dancer::Plugin::RequireSSL; and made the changes in webapp

package webapp; use Dancer2; use Dancer::Plugin::RequireSSL; use Op; our $VERSION = '0.1'; require_ssl(); get '/' => sub { template 'query' => { 'title' => 'webapp' }; }; post '/' => sub { my $r = Op::result({APPID => param('APPID'), date => param('date'), Email => param('Email')}); template result => { title => 'webapp', result => $r } }; true;

Are there any solution to get the https://localhost:5000 working?

2021-05-01 Athanasius fixed over-long code line.