Deploy on own server is not working



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, () => {`Local server listening on port ${port}.`);
  });['/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.


Could you try to change the port to 443?


I have tried, it only points to the HTTP even if I ask for HTTPS, is there something I can try to add to the code? Or what could it be the problem?


The problem was that this part here, must stay above the Webhook.listen, after that, I used the 443 port.

I suggest changing the order in the tutorial about deploying on own server (this)