GithubHelp home page GithubHelp logo

bridgely-api's Introduction

Bridgely API

This is a work in progress, and my first Rails app! Pull requests would be awesome.

This is the backend API for Bridgely. See more about this project at http://github.com/nason/bridgely

Environment variables must be configured for Bridgely-API to communicate with Twilio. See the configuration section below.

Ruby version

2.0.0

Stack

  • Rails 4
  • Rails-API
  • Active Model Serializers
  • Twilio-Ruby
  • Devise
  • BCrypt-Ruby
  • Figaro
  • PostgreSQL

Configuration

  1. bundle install

  2. Create a new application.yml file in the config folder - 'touch config/application.yml'

  3. Add application configuration variables here, as shown below: TWILIO_SID: "123abc" TWILIO_AUTH_TOKEN: "abc123" TWILIO_APP_SID: "a1b2c3"

  • Note: you will need to create a Twilio app with the SMS status and SMS inbound URLs configured to point to your deployment.
  • You can group these envirionments in test, development, and production if you need
  1. If the frontend is served from the public folder you can disable CORS headers. Otherwise, leave them on and whitelist trusted origins in app/application_controller.rb

  2. Update db/seeds.rb to setup your admin user, and any companies or company users you may need to import.

Database creation

rake db:schema:load

Database initialization

rake db:seed

Services (job queues, cache servers, search engines, etc.)

Coming soon!

Deployment instructions

Make sure your environment variables are set, and rails server. You can rake figaro:heroku to push environment variables to Heroku.

SSL is highly reccomended. You'll have to configure that on your own...

Your Twilio account must be verified and funded in order for this API to send or receive any messages, or to create any subaccounts. See Twilio's pricing page for information on operating costs.

bridgely-api's People

Contributors

nason avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bridgely-api's Issues

Readme needs instructions on what variable to pass for authorization_token

Hello,
I'm trying to get this to work, but I keep getting HTTP Token: Access denied.
I'm not sure what to pass in the url for the authorization_token. I assumed
http://localhost:#{som_port}/v1/companies/1/employees.json?authorization_token=#{some_admin.authorization_token}, but I keep getting
the error in the browser - I think I'm just passing the wrong variable in the url.

I tried commenting out the cors temporarily also but not luck, and I end up getting denied in require_token. I set up the Twilio constants in test and development environments, but no luck.

Thanks in advance for any help you can provide.

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.