Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top