├── .ruby-version ├── Procfile ├── config.ru ├── connect-logo.png ├── public ├── images │ └── lang-logo.png └── main.css ├── Gemfile ├── views ├── index.erb ├── layout.erb └── home.erb ├── environments.rb ├── app.json ├── app.rb ├── README.md └── Gemfile.lock /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.2.0 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: ruby app.rb 2 | console: tux 3 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # config.ru 2 | 3 | require './app' 4 | $stdout.sync = true 5 | run Sinatra::Application 6 | -------------------------------------------------------------------------------- /connect-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lyric/no-local-dev-getting-started/master/connect-logo.png -------------------------------------------------------------------------------- /public/images/lang-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lyric/no-local-dev-getting-started/master/public/images/lang-logo.png -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | ruby "2.2.0" 3 | 4 | gem "sinatra" 5 | gem "activerecord" 6 | gem "sinatra-activerecord" 7 | 8 | gem 'pg' 9 | 10 | # a little console 11 | gem "tux" 12 | -------------------------------------------------------------------------------- /views/index.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <% @contacts.each do |contact| %> 11 | 12 | 13 | 14 | 15 | 16 | <% end %> 17 |
First NameLast NameEmail
<%= contact.firstname %><%= contact.lastname %><%= contact.email %>
18 | 19 |
20 | -------------------------------------------------------------------------------- /environments.rb: -------------------------------------------------------------------------------- 1 | configure :development do 2 | set :show_exceptions, true 3 | end 4 | 5 | configure :production, :development do 6 | db = URI.parse(ENV['DATABASE_URL'] || 'postgres://localhost/mydb') 7 | 8 | ActiveRecord::Base.establish_connection( 9 | :adapter => db.scheme == 'postgres' ? 'postgresql' : db.scheme, 10 | :host => db.host, 11 | :username => db.user, 12 | :password => db.password, 13 | :database => db.path[1..-1], 14 | :encoding => 'utf8' 15 | ) 16 | end 17 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Getting Started No Code", 3 | "description": "A basic app showing Heroku, and Heroku Connect, supporting a no-local-dev Getting Started tutorial on Dev Center", 4 | "logo": "https://raw.githubusercontent.com/heroku/no-local-dev-getting-started/master/connect-logo.png", 5 | "website": "https://devcenter.heroku.com/articles/getting-started-with-heroku-and-connect-without-local-dev", 6 | "repository": "https://github.com/heroku/no-local-dev-getting-started", 7 | "success_url": "/", 8 | "addons": ["heroku-postgresql", "herokuconnect:demo"] 9 | } 10 | -------------------------------------------------------------------------------- /app.rb: -------------------------------------------------------------------------------- 1 | # app.rb 2 | 3 | require 'sinatra' 4 | require 'sinatra/activerecord' 5 | require './environments' 6 | 7 | 8 | get "/" do 9 | erb :home 10 | end 11 | 12 | 13 | class Contact < ActiveRecord::Base 14 | self.table_name = 'salesforce.contact' 15 | end 16 | 17 | get "/contacts" do 18 | @contacts = Contact.all 19 | erb :index 20 | end 21 | 22 | get "/create" do 23 | dashboard_url = 'https://dashboard.heroku.com/' 24 | match = /(.*?)\.herokuapp\.com/.match(request.host) 25 | dashboard_url << "apps/#{match[1]}/resources" if match && match[1] 26 | redirect to(dashboard_url) 27 | end 28 | -------------------------------------------------------------------------------- /public/main.css: -------------------------------------------------------------------------------- 1 | .jumbotron { 2 | background: #532F8C; 3 | color: white; 4 | padding-bottom: 80px; } 5 | .jumbotron .btn-primary { 6 | background: #845ac7; 7 | border-color: #845ac7; } 8 | .jumbotron .btn-primary:hover { 9 | background: #7646c1; } 10 | .jumbotron p { 11 | color: #d9ccee; 12 | max-width: 75%; 13 | margin: 1em auto 2em; } 14 | .jumbotron h1 { 15 | font-size: 40px;} 16 | .navbar + .jumbotron { 17 | margin-top: -20px; } 18 | .jumbotron .lang-logo { 19 | display: block; 20 | background: #B01302; 21 | border-radius: 50%; 22 | overflow: hidden; 23 | width: 100px; 24 | height: 100px; 25 | margin: auto; 26 | border: 2px solid white; } 27 | .jumbotron .lang-logo img { 28 | max-width: 100%; } 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nocoding-getting-started 2 | 3 | **Warning - under active development** 4 | 5 | This is a simple application that can be used to sync (and then view) data from Salesforce using Heroku Connect. 6 | 7 | It supports a Getting Started article on Heroku Dev Center that shows how to set up and manage an app without requiring you to install any development tools. 8 | 9 | # Deploy 10 | 11 | The easiest way to deploy this is to push the button: 12 | 13 | [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) 14 | 15 | 16 | # Verified 17 | 18 | If you are not yet a Heroku verified account holder, clicking the Heroku button will prompt you to sign up for Heroku first, and enter billing details. These details are required for abuse prevention - running this app in the standard configuration won't incur any costs. 19 | 20 | # Running 21 | 22 | After you verify your Heroku account, clicking the Heroku button will create an app, a database, and a demo instance of Heroku Connect. Following the resulting link will guide you through final configuration in the Heroku Connect UI. 23 | 24 | Please make sure that you are in the intended Heroku app context, as you may not be defaulted to the new Heroku Connect app if you have multiple instances already running. 25 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activemodel (4.2.1) 5 | activesupport (= 4.2.1) 6 | builder (~> 3.1) 7 | activerecord (4.2.1) 8 | activemodel (= 4.2.1) 9 | activesupport (= 4.2.1) 10 | arel (~> 6.0) 11 | activesupport (4.2.1) 12 | i18n (~> 0.7) 13 | json (~> 1.7, >= 1.7.7) 14 | minitest (~> 5.1) 15 | thread_safe (~> 0.3, >= 0.3.4) 16 | tzinfo (~> 1.1) 17 | arel (6.0.0) 18 | bond (0.5.1) 19 | builder (3.2.2) 20 | i18n (0.7.0) 21 | json (1.8.2) 22 | minitest (5.5.1) 23 | pg (0.18.1) 24 | rack (1.6.0) 25 | rack-protection (1.5.3) 26 | rack 27 | rack-test (0.6.3) 28 | rack (>= 1.0) 29 | ripl (0.7.1) 30 | bond (~> 0.5.1) 31 | ripl-multi_line (0.3.1) 32 | ripl (>= 0.3.6) 33 | ripl-rack (0.2.1) 34 | rack (>= 1.0) 35 | rack-test (~> 0.6.2) 36 | ripl (>= 0.7.0) 37 | sinatra (1.4.6) 38 | rack (~> 1.4) 39 | rack-protection (~> 1.4) 40 | tilt (>= 1.3, < 3) 41 | sinatra-activerecord (2.0.5) 42 | activerecord (>= 3.2) 43 | sinatra (~> 1.0) 44 | thread_safe (0.3.5) 45 | tilt (2.0.1) 46 | tux (0.3.0) 47 | ripl (>= 0.3.5) 48 | ripl-multi_line (>= 0.2.4) 49 | ripl-rack (>= 0.2.0) 50 | sinatra (>= 1.2.1) 51 | tzinfo (1.2.2) 52 | thread_safe (~> 0.1) 53 | 54 | PLATFORMS 55 | ruby 56 | 57 | DEPENDENCIES 58 | activerecord 59 | pg 60 | sinatra 61 | sinatra-activerecord 62 | tux 63 | -------------------------------------------------------------------------------- /views/layout.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Getting Started on Heroku 5 | 6 | 7 | 8 | 9 | 10 | 11 | 44 | 45 | <%= yield %> 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /views/home.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 |

Getting Started on Heroku with Heroku Connect....awesome!!

7 |

This is a sample application deployed to Heroku. It's a reasonably simple app - but a good foundation for understanding how to get the most out of the Heroku platform and Heroku Connect.

8 | Connect with your Salesforce Org 9 | Source on GitHub 10 |
11 |
12 |
13 | 16 |
17 |
18 |
19 |

How this tutorial works

20 |
    21 |
  • This app was deployed to Heroku by clicking the Heroku Button in the tutorial.
  • 22 |
  • Heroku Button transfers the source code for the application, transfers any app dependencies, builds and deploys the app on Heroku, and provisions a web domain for it too.
  • 23 |
  • The app will also provision a Heroku Postgres database, and a Heroku Connect add-on, one of over 150 add-on services.
  • 24 |
  • Heroku Connect provides seamless data synchronisation between a Heroku Postgres database and a Salesforce Org. Clicking the "Connect with your Salesforce Org" configures Heroku Connect to perform this sync.
  • 25 |
  • Check out the Getting Started guide to learn more!
  • 26 |
27 |
28 |
29 |

Helpful Links

30 | 36 |
37 |
38 | 41 |
42 | --------------------------------------------------------------------------------