Forwards Devy skill requests from Alexa to the appropriate Devy client application.
Proxies Devy intent requests from the Alexa service to the appropriate client application based on the user ID in the request. When a user registers their Alexa device, they are given an ID which is used during the installation of the client application to associate the Alexa device with a computer.
The proxy logs all traffic to a database running on the proxy server. This data will be used to analyze conversations.
The Devy proxy uses PM2 to daemonize the node application during deployment. See the pm2 cheatsheet for a list of commands you can use to manage the app.
To start the proxy, run
pm2 start devy-proxy
To stop the proxy, run
pm2 stop devy-proxy
- Install the Docker engine (tested with v1.12.1).
- Install Node.js (tested with v6.5.0).
a. Allow node to bind to protected ports. For Linux, usesudo setcap cap_net_bind_service=ep /usr/local/bin/node
, adjusting the path to the node binary. - Install PM2
npm install pm2 -g
(tested with v2.4.6). Note: if you get an EACCES error fix your npm permissions.
a. Configure the PM2 startup scriptpm2 startup
. - Download the latest release from the Devy project page.
a. Extract the proxy.zip andcd
into the extracted directory.
b. Create an ssl directorymkdir ssl
and copy over yourfullchain.pem
andprivkey.pem
files generated by the Let's Encrypt cerbot.
c. Create the.env
file in the project root. Alternatively, skip to the next step which will generate a default version of the.env
file.
d. Run the deploy scriptnpm deploy
.
Go to the cerbot webpage and select Software: none and System: . Follow the instructions for generating a certificate the built-in STANDALONE webserver. The important notes shown once the certificate has been generated will indicate its location.
To update the proxy, download the latest release zip and overwrite the previous version of the files. Restart the app pm2 restart devy-proxy
.
Port 443 is blocked. Can I choose a different port?
No. It is hard-coded in the app because the Alexa service will only send requests on port 443.
Can I use a self-signed certificate, or just disable SSL?
No. The Alexa service requires that its requests be sent securely using SSL certificates recognized by Amazon.