Clone this repo to get started building an Alexa skill for Purescript
- Node.js (and npm)
- Purescript, psc-package, and pulp.
npm install -g purescript psc-package pulp
- The ask-cli Alexa Skills Kit command-line interface.
npm install -g ask-cli
- Initialize ask-cli with your AWS credentials
ask init
- Clone this repo
git clone https://github.com/twitchard/purescript-alexa-template
- Build
npm run build-all
3 (optional). You may want to open .ask/config
and edit deploy_settings.default.merge.skillManifest.apis.custom.endpoint.uri to be the desired name of your lambda function. Otherwise it will be set to ask-custom-purescript_template-default
.
- Deploy
npm run deploy-all
- Now go to https://console.aws.amazon.com/lambda
select your lambda function, and change the 'Handler' to Main/index.handler
.
- Test
Go to https://developer.amazon.com/edw/home.html#/skills , log in to your Amazon Developer account, select your newly created skill, click "test" in the side menu, flip the switch to enable the skill for testing.
Then click "Go to Test Simulator" and type "open purescript template" to invoke your skill. Or just say it to Alexa if you have one nearby hooked up to your account.
- Edit
Tweak the code to your heart's delight!