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.
2.0.0
- Rails 4
- Rails-API
- Active Model Serializers
- Twilio-Ruby
- Devise
- BCrypt-Ruby
- Figaro
- PostgreSQL
-
bundle install
-
Create a new application.yml file in the config folder - 'touch config/application.yml'
-
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
-
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
-
Update db/seeds.rb to setup your admin user, and any companies or company users you may need to import.
- Bridgely API creates a Twilio subaccount for each company. If you need to transfer a number, you'll need to open rails console and follow Twilio's excellent documentation.
rake db:schema:load
rake db:seed
Coming soon!
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.