Skip to content

doppiomacchiatto/angular-salesforce-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularJS Salesforce Demo with Ruby on Rails

This demo AngularJS application connects to Salesforce.com using Ruby on Rails and the Restforce gem. The application creates, updates and displays Account records from Salesforce.com.

You can run the application and/or read the accompanying blog post with complete details.

Requirements

It is assumbed that you have the following:

  • Force.com Development Org with Remove Access setup (see this video if you need help)
  • Ruby installed and running
  • Heroku toolbelt with git for deployment to Heroku

Local Development

# clone the repo locally
git clone https://github.com/jeffdonthemic/angular-salesforce-demo.git
# cd into the new directory
cd angular-salesforce-demo
# run bundler to install the gems
bundle

To connect the application to your Force.com development org you need to add your client id and client secret to the .env-example file as well as your username and password (with security token). Rename .env-example to .env.

If all is setup correctly, you should be able to start the application with:

foreman start -p 3000

Now point your browser to http://localhost:3000/accounts.json and you should see your 5 most recently updated Accounts from your DE org.

Deploy to Heroku

# create your application on heroku
heroku create [YOUR-APP-NAME]

# add all of your environment settings from the .env file
heroku config:add SFDC_CLIENT_ID=[YOUR-CLIENT-ID]
heroku config:add SFDC_CLIENT_SECRET=[YOUR-CLIENT-SECRET]
heroku config:add SFDC_HOST=login.salesforce.com
heroku config:add SFDC_USERNAME=[YOUR-USERNAME]
heroku config:add SFDC_PASSWORD=[YOUR-PASSWORD-AND-TOKEN]

# push your code to heroku
git push heroku master

# after the deploy completes, open your application
heroku open

Contributors

About

Demo AngularJS application that connects to Salesforce.com using Ruby on Rails. The application creates, updates and displays Account records from Salesforce.com.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 75.1%
  • HTML 18.7%
  • CSS 2.9%
  • JavaScript 2.9%
  • CoffeeScript 0.4%