Following your guide I’m trying to deploy an Alexa Skill to my own server.
const { WebhookVerified: Webhook, ExpressJS } = require('jovo-framework');
const { app } = require('./app.js');
if (process.argv.indexOf('--webhook') > -1) {
const port = process.env.JOVO_PORT || 80;
Webhook.jovoApp = app;
Webhook.listen(port, () => {
console.info(`Local server listening on port ${port}.`);
});
Webhook.post(['/webhook','/webhook_alexa'], async (req, res) => {
await app.handle(new ExpressJS(req, res));
});
const fs = require('fs');
Webhook.ssl = {
key: fs.readFileSync('/etc/letsencrypt/live/mydomain/privkey.pem'),
cert: fs.readFileSync('/etc/letsencrypt/live/mydomain/fullchain.pem'),
};
}
// AWS Lambda
exports.handler = async (event, context, callback) => {
await app.handle(new Lambda(event, context, callback));
};
This is my index.js, I had done the “node index.js -webhook” but the server is only getting the HTTP request and note the HTTPS. Why is this happening?
Trying with a custom project.js that enable HTTP and HTTPS everything works, so the problem is not with the certificate.