Code Monkey home page Code Monkey logo

hello-gmom's Introduction

Hello Gmom!

This is a tiny Rails application for sending messages and photos to Bren's Grandmother. ^_^

Requirements & Dependencies

  • Rails 5 (because we're living in the future)
  • A Twilio account, phone number, and API key.
  • rvm
  • Postgres (but this is Rails, so use whatevs)
  • Redis (for ActionCable/websocket connections in production)
  • Nginx (conf/nginx.conf can be customized, or replaced with whatevs)
  • Puma (because Unicorn has problems upgrading requests for websocket connections)

.env

When the Rails app boots, it's gonna load key/value pairs from a .env file in the application root. This is where we put sensitive values, like API keys, so do not add your .env to source control.

Here are the values Rails expects to be in .env:

  • SECRET_KEY_BASE: Call me old school, but I use rake secret for this
  • TWILIO_ACCOUNT_SID: provided by Twilio once you've created an account
  • TWILIO_AUTH_TOKEN: same as above ^
  • TWILIO_NUMBER: you gotta buy this from Twilio. It's the number to which you'll send sms/mms messages
  • DB_USER: Rails looks here for database credentials when booting in production
  • DB_PASS: yup ^
  • Seed phone numbers: Rails seeds Sender objects. Senders are the list of approved numbers to which the app responds. Everyone else gets a 403 Forbidden. Have a look at db/seeds.rb to see what Rails is expecting.

Setup

  1. Clone the repo
  2. Enter clone directory & verify gemset creation/use ($ rvm gemset list, hello-gmom should be active gemset)
  3. Install Bundler ($ gem install bundler)
  4. Install gem dependencies ($ bundle)
  5. Customize...
  6. Create and populate .env
  7. Update database seeds (db/seeds.rb)
  8. Update database credentials for development/test (config/database.yml) or set up a Postgres role to match what's already in the file. (create role hello_gmom with createdb login password 'whatevs';)
  9. Setup the database ($ rake db:setup)
  10. Start the server ($ rails server)

Useful articles

Here's a list of articles I referenced while working on this. Maybe they'll help you too.

hello-gmom's People

Contributors

jnf avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

brennx0r nicosaki

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.