Sha256: 82bc9347af571517d475765740fc1b098b79fbd54aab5bd16bdc0e031b517956

Contents?: true

Size: 728 Bytes

Versions: 7

Compression:

Stored size: 728 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::SimpleServer.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

7 entries across 7 versions & 1 rubygems

Version Path
opal-1.0.5 examples/rack/config.ru
opal-1.0.4 examples/rack/config.ru
opal-1.0.3 examples/rack/config.ru
opal-1.0.2 examples/rack/config.ru
opal-1.0.1 examples/rack/config.ru
opal-1.0.0 examples/rack/config.ru
opal-1.0.0.beta1 examples/rack/config.ru