An Alexa skill for finding information on your members of Congress.
- Requires Node v4.3.2
- Package engine is set to strict to match AWS Lambda Environment
- I recommend using NVM
This project includes Mocha and Chai for testing service data parsing. If you add to this, write more tests. And run them:
$ npm test
As far as I know, you can't connect to an Alexa Device locally, but there is a way to run a development server with a test harness using Alexa App Server.
Open another terminal window and cd into the parent directory where you can clone the test harness:
$ cd ../
$ git clone https://github.com/matt-kruse/alexa-app-server
$ cd alexa-app-server && npm i
Then, in this directory's terminal, create a sim link in the alexa-app-server test harness to this project:
$ ln -s "$(pwd)" "../alexa-app-server/examples/apps/${PWD##*/}"
Then run a watch to transpile the alexa app source code from ES6 to ES5
$ npm run local
Return to the terminal/directory in which you installed alexa-app-server and run the following:
cd examples && node server
Then visit the test harness at http://localhost:8000/alexa-who-are-my-congressmen
###Compiling For Upload Make sure the bin directory has executable permissions:
$ chmod +x ./bin/build.sh
If this throws an error, trying using sudo:
$ sudo chmod +x .bin/build.sh
Transpile the ES6 and zip up the relevant files for upload by running:
$ npm run build
This should output files.zip to the project root for upload to the AWS Lambda Console.
All code is transpiled from ES6 with Babel. The lint config is based on AirBnB's eslint. To lint the code run:
$ npm run lint