Giter Site home page Giter Site logo

guess-the-word's Introduction

Twilio Hangman with Express

A GitHub walkthrough based off of this tutorial

Prereqs

  1. Have a valid SMS number that can be used for testing
  2. Have Node.js
  3. Have a Twilio account with a valid phone number

Set Up

  1. Fork this repository and clone your fork to your local computer
  2. cd into this repository through your terminal
  3. Run npm install to download the necessary packages
  4. In the terminal, run npm install twilio express-session -- this is going to be the basis of our edits today
  5. npm install express-generator -g
  6. npm install twilio-cli -g
  7. Open app.js
  8. Add the appropriate requirements:

var session = require('express-session'); after the imports

app.use(session({ secret: 'twilio rocks', resave: false, saveUninitialized: false})); after app is defined. Note: you wouldn't use a secret like 'twilio rocks' in production, this is only for workshop purposes

  1. Run npm start in your terminal to verify that nothing throws an exception
  2. Go to routes/index.js
  3. Follow the notes made on that page to complete the workshop, starting with the INTRO SECTION on line 15.

Running the Game

  1. Make sure you're running your local server by using npm start
  2. Open another tab in terminal and run twilio login and log in with the credentials found in your Twilio console
  3. Run twilio phone-numbers:update "+yournumber" --sms-url="http://localhost:3000/play-game" where yournumber is instead a 11-digit phone number, i.e. +18005551234

guess-the-word's People

Contributors

maralihart avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.