Git Product home page Git Product logo

indy-civic-hack-twilio's Introduction

Twilio

Employee Directory

Build Status

Use Twilio to accept SMS messages and turn them into queries against a database. This example functions as an Employee Directory where a mobile phone user can send a text message with a partial string of a person's name and it will return their picture and contact information (e-mail address and phone number).

Read the full tutorial here!

Local Development

This project is build using Express web framework and depends on MongoDB.

  1. First clone this repository and cd into it.

    $ git clone [email protected]:TwilioDevEd/employee-directory-node.git
    $ cd employee-directory-node
  2. Install the dependencies

$ npm install
  1. Make sure the tests succeed.

    $ npm test
  2. Seed the database.

    $ npm run seed
  3. Start the server.

    $ npm start
  4. Check it out at http://localhost:3000.

Expose the Application to the Wider Internet

  1. Expose your application to the wider internet using ngrok. You can click here for more details. This step is important because the application won't work as expected if you run it through localhost.
$ ngrok http 3000

Once ngrok is running, open up your browser and go to your ngrok URL. It will look something like this: http://9a159ccf.ngrok.io

  1. Configure Twilio to call your webhooks.

You will also need to configure Twilio to call your application when calls are received on your Twilio Number. The SMS & MMS Request URL should look something like this:

http://<sub-domain>.ngrok.io/directory/search

Configure SMS

How To Demo

  1. Text your twilio number the name "Thor".

  2. Should get the following response:

    We found multiple people, reply with:
    1 for Thor
    2 for Frog Thor
    3 for Thor Girl
    Or start over
    
  3. Reply with 1.

  4. Should get the following response:

    Thor
    +14155559999
    [email protected]
    [the image goes here]
    

## Meta

* No warranty expressed or implied. Software is as is. Diggity.
* [MIT License](http://www.opensource.org/licenses/mit-license.html)
* Lovingly crafted by Twilio Developer Education.

indy-civic-hack-twilio's People

Contributors

berlinquin avatar

Watchers

 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.