Git Product home page Git Product logo

alexa-hospital-room's Introduction

alexa-hospital-room

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.

Installation Order

  1. Install Salesforce backend (see https://github.com/chadevanssf/salesforce-hospital-room)
  2. Install Heroku app (this project)
  3. Install Alexa Skill (this project)

Deploying locally

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/)

  1. Set the local postgres to the environment variable:
export DATABASE_URL=postgres:///$(whoami)
  1. 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
  1. Your app should now be running on http://localhost:8080.

Testing it

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.

SSL required

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

Deploying to Heroku

heroku create <heroku-app-name>
git push heroku master
heroku open

Alternatively, you can deploy your own copy of the app using this button:

Deploy to Heroku

Your app should now be running on https://<heroku-app-name>.herokuapp.com, where <app-name> is the heroku app name.

Adding Heroku Connect

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.

Testing it

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

Deploying to Alexa Skill

You can access the configuration page https://<heroku-app-name>.herokuapp.com/ to get the information that the Alexa Skill requires.

Helpful Commands

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

alexa-hospital-room's People

Contributors

chadevans-mulesoft avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.