Created
August 24, 2016 14:45
-
-
Save primaryobjects/24f473d64a1220f2bffadfbb2b44bf94 to your computer and use it in GitHub Desktop.
Your first Amazon Alexa skill: Hello World. Running on alexa-app-server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var alexa = require('alexa-app'); | |
// Create a skill. | |
var hello = new alexa.app('hello'); | |
// Launch method to run at startup. | |
hello.launch(function(req,res) { | |
res.say("Ask me to say hi!"); | |
// Keep session open. | |
res.shouldEndSession(false); | |
}); | |
// Create an intent. | |
hello.intent('hello', { | |
'slots': {}, | |
'utterances': [ '{to |}{say|speak|tell me} {hi|hello|howdy|hi there|hiya|hi ya|hey|hay|heya}' ] | |
}, | |
function(req, res) { | |
res.say('Hello, World!'); | |
res.shouldEndSession(false); | |
} | |
); | |
module.exports = hello; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "hello", | |
"version": "0.0.1", | |
"main": "index.js", | |
"dependencies": { | |
"alexa-app": "*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment