Developing Alexa Skills Locally with ngrok and Node.JS

Christian Nadeau | March 7, 2017 | 2 Min Read

How you can start developing Alexa skills locally using ngrok and your NodeJS server.

We never had an easy way to develop Alexa skills locally and unit testing was one of the ways to actually test them.

Looking at the documentation for Google Home Actions, I discovered an amazing tool: ngrok!

SEE MORE: Using Rancher to Manage Docker-Machines on Azure

What does it do? It exposes your localhost publicly through an HTTP tunnel. This way, you can simply run your local NodeJS server.

$ npm install

$ npm start

server listening on localhost:3000

Then, in another terminal (once your ngrok executable is in your $PATH)

ngrok http -bind-tls=true -host-header=rewrite 3000

Copy the https URL displayed by ngrok and paste it as the host for your Alexa skill configuration.

At first, it did not work because the SSL certificate is not detected as valid and it leads to a signature chain verification failure.

BUT, changing the Alexa skill SSL Certificate configuration to:

My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority

allowed the skill to be accessible!

And voilà! Enjoy developing your skill locally without having to redeploy all the time.

This post originally appeared on Medium

Get Email Updates

Get updates and be the first to know when we publish new blog posts, whitepapers, guides, webinars and more!

Suggested Stories

Applications of Voice Assistants in Healthcare

Discover how organizations across the continuum of care can leverage the growing consumer demand for voice-enabled devices to achieve an extensive list of objectives from increased patient engagement to improved outcomes and lowered care costs.

Read More

Voice UI Design Best Practices

Voice assistants are poised to transform customer engagement as well as business models. Discover why voice is the next digital frontier – and what you should know about voice-first solutions.

Read More

Guide to Creating Engaging Digital Health Software

This guide shares our knowledge and insights from years of designing and developing software for the healthcare space. Focusing on your user, choosing the right technology, and the regulatory environment you face will play a critical role in the success of your application.

Read More
Macadamian has been acquired by Emids 🎉
This is default text for notification bar