Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I setup my server with https and perl Dancer as a standalone server?

We need to create a quick demo of a web service using Perl's Dancer as a standalone webserver, and Twitter API.

Unforunately, Twitter API only allows https/ssl requests but I have no idea how to set this up on a server that isn't using Apache.

I have a Comodo EV Cert, and I think a correct pem file in the /etc/ssl/localcerts directory on my server.

I also have Dancer::Plugin::RequireSSL and Crypt::SSLeay installed but the instructions aren't clear to me.

Do I add it to the project/bin/app.pl file?

Do I need to add environment variables to bash?

How do I configure Dancer to use https for making calls to Twitter API using Net::Twitter?

like image 640
qodeninja Avatar asked Apr 16 '26 10:04

qodeninja


1 Answers

Looks like the cert is set to the environment with Crypt::SSLeay stated here.

It also looks like Dancer can be configured to redirect to ssl in a config file.

Take a look at Support for the comment about supporting HTTPS in Dancer.

like image 166
zachhilbert Avatar answered Apr 19 '26 02:04

zachhilbert



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!