For voice apps in prototyping stage, we recommend using a local webserver and a service like jovo webhook or bst proxy. This way, you can easily update your app without having to upload it to a server or AWS Lambda every time.
Jovo uses the
express framework for running a server. Here is how the part of
index.js, which is used to run the app on a webhook, looks like:
You can either run your server locally, or deploy to a webhosting service.
You can use either of the following commands to run the server locally:
Make sure that, with every file update, you terminate the server with
ctrl+c and run it again. Find more information on the
jovo run command here: CLI: jovo run.
$ jovo run should return this:
As you can see, a
jovo webhook URL is automatically created, which serves as a link to your local webhook and can be posted as a HTTPS endpoint to the voice platforms.
Here are all the services that can point to your local development server:
jovo webhook is a free service that creates a link to your local webserver. This way, you can prototype locally without having to deal with servers or Lambda uploads all the time.
This link simply makes it easier for you to prototype locally by being able to see the logs in your command line, and to make fast changes without uploading your code to AWS Lambda.
You can either use this link and paste it into the respective developer platform consoles, or use the
jovo deploy command to upload it from the command line (
jovo webhook is the default
endpoint added to
app.json with the
jovo init command).
Find the following sections in our beginner tutorials to learn how to do so:
You can run the proxy with the
jovo run command:
This is what the result looks like:
Now, you can not only use the link as an endpoint, but also use it to access Bespoken Analytics for powerful logging capabilities:
Ngrok is a tunneling service that makes your localhost accessible to outside APIs.
You can download ngrok like so:
It should display something similar to this:
jovo webhookURL is only meant for prototyping purposes and can't be used in production. Follow the steps here to find out how to deploy your voice app to a production server.
When you want to deploy your code to a webserver other than AWS Lambda, you need to verify that Alexa Skill requests are actually coming from Amazon.
For this, Jovo uses a package called alexa-verifier-middleware, which can be accessed by switching one line of the configuration in
To make use of it, please install it like so:
To run the server, use the following command:
Any specific questions? Just drop them below. Alternatively, you can also fill out this feedback form. Thank you!