Sha256: a571d6f6c565b205d9a6ac9a76d960585d535ffb4a09d70a0d73abc35e96f522

Contents?: true

Size: 721 Bytes

Versions: 23

Compression:

Stored size: 721 Bytes

Contents

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'
}

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
opal-0.10.6 examples/rack/config.ru
opal-0.10.6.beta examples/rack/config.ru
opal-0.10.5 examples/rack/config.ru
opal-0.10.4 examples/rack/config.ru
opal-0.10.3 examples/rack/config.ru
opal-0.10.2 examples/rack/config.ru
opal-0.10.1 examples/rack/config.ru
opal-0.10.0 examples/rack/config.ru
opal-0.10.0.rc2 examples/rack/config.ru
opal-0.9.4 examples/rack/config.ru
opal-0.9.3 examples/rack/config.ru
opal-0.10.0.rc1 examples/rack/config.ru
opal-0.10.0.beta5 examples/rack/config.ru
opal-0.10.0.beta4 examples/rack/config.ru
opal-0.10.0.beta3 examples/rack/config.ru
opal-0.10.0.beta2 examples/rack/config.ru
opal-0.10.0.beta1 examples/rack/config.ru
opal-0.9.2 examples/rack/config.ru
opal-0.9.0 examples/rack/config.ru
opal-0.9.0.rc1 examples/rack/config.ru