An Alexa Skill project using the alexa-app module with Express. Leverages Heroku for the logic instead of Amazon Lambda, and uses Heroku Connect to access data from Salesforce for the business logic.
- Install Salesforce backend (see https://github.com/chadevanssf/salesforce-hospital-room)
- Install Heroku app (this project)
- Install Alexa Skill (this project)
Make sure you have Node.js and the Heroku Toolbelt installed. Must also have a local copy of Postgres (example for Mac: https://postgresapp.com/)
- Set the local postgres to the environment variable:
export DATABASE_URL=postgres:///$(whoami)
- Get the code and run it locally:
git clone https://github.com/chadevanssf/alexa-hospital-room.git # or clone your own fork
cd alexa-hospital-room
npm install
npm start
- Your app should now be running on http://localhost:8080.
You can access a test page to verify if the basic setup is working fine: http://localhost:8080/, which will list all the Alexa Skill Apps configured with this project, and you can select on each one to test the response.
You must have SSL enabled in your local psql for this to work. Suggested way to enable is found at https://www.postgresql.org/docs/9.6/static/ssl-tcp.html under Creating a Self-signed Certificate
heroku create <heroku-app-name>
git push heroku master
heroku open
Alternatively, you can deploy your own copy of the app using this button:
Your app should now be running on https://<heroku-app-name>
.herokuapp.com, where <app-name>
is the heroku app name.
You will need to have a Salesforce org with the following project installed:
https://github.com/chadevanssf/salesforce-hospital-room
You can then import the connection configuration at /util/alexa-hospital-room.json.
You can access a test page to verify if the basic setup is working fine: https://<app-name>
.herokuapp.com/.
Test the database by going to https://<app-name>
.herokuapp.com/db
You can access the configuration page https://<heroku-app-name>
.herokuapp.com/ to get the information that the Alexa Skill requires.
Get changes from your local git into Heroku
git add .
git commit -m "Updates"
git push heroku master
Get the Postgres DB connection info:
heroku pg:credentials:url DATABASE
Set your app to be production:
export NODE_ENV=production