This project is designed to be a simple template for your new skills. With some well thought defaults that have proven useful when developing real life skills.
It has the following directory structure
. ├── README.md ├── config │ ├── env.js │ ├── index.js │ ├── local.json.example │ ├── production.json │ └── staging.json ├── gulpfile.js ├── package.json ├── serverless.yml ├── services ├── skill │ ├── MainStateMachine.js │ ├── index.js │ ├── variables.js │ └── views.js ├── speechAssets │ ├── IntentSchema.json │ ├── SampleUtterances.txt │ └── customSlotTypes ├── test ├── server.js
By default your skill will have the following environments:
What environment you’re is determined in the
config/env.js module using the following code:
This should be a version controlled copy of your intent schema, sample utterrances and custom slots.
An http server for your skill configured to listen on port 3000, this should be used for development only.
Just a common place to put models and libraries
You write tests right?
A gulp runner configured with a watch task that starts your express server and listens for changes to reload your application.
The serverless framework is a tool that helps you manage your lambda applications, assuming you have your AWS credentials setup properly this starter kit defines the very minimum needed so you can deploy your skill to lambda with the following command:
$ sls deploy
Dependencies (install these first)¶
- If you are using node.js for the first time, install node:
- Install nvm,
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash,
- Install node 6.10,
nvm install 6.10
Running the project¶
- Clone the Starter Kit repository
- Make sure you’re running node 6.10, this is easiest with nvm
- In your skill directory, install node dependencies using
- Create a
config/local.json.exampleas an example
- Run the project with
- At this point you should start
ngrok http 3000and configure your skill in the Amazon Developer panel to use the ngrok https endpoint.