Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9eedb349b6c4
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6b7bc1e84ae1
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jul 23, 2015

  1. some explanations added, using the index too

    Torsten Ruger committed Jul 23, 2015
    Copy the full SHA
    b0a13da View commit details
  2. Merge pull request #1022 from dancinglightning/master

    some explanations added, using the index too
    elia committed Jul 23, 2015
    Copy the full SHA
    6b7bc1e View commit details
Showing with 13 additions and 0 deletions.
  1. +13 −0 examples/rack/config.ru
13 changes: 13 additions & 0 deletions examples/rack/config.ru
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
require 'bundler'
Bundler.require

# Instructions: bundle in this directory
# then run bundle exec rackup to start the server
# and browse to localhost:9292

# a very small application that just tries to authenticate a user and fails
# it just writes to the console in the browser (no visible html)

# with gems like opal-jquery or opal-browser you could manipulate the dom directly

run Opal::Server.new { |s|
# the name of the ruby file to load. To use more files they must be required from here (see app)
s.main = 'application'
# the directory where the code is (add to opal load path )
s.append_path 'app'
# need to set the index explicitly for opal server to pick it up
s.index_path = 'index.html.erb'
}