Sha256: 6e90561216b19788032532a09cd276ee05c39cd88be19799b9eb909cdbf26c94

Contents?: true

Size: 775 Bytes

Versions: 26

Compression:

Stored size: 775 Bytes

Contents

require 'bundler'
Bundler.require

# Instructions: bundle in this directory
# then run `bundle exec rackup` to start the server
# and browse to http://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

# the directory where the code is (add to opal load path )
Opal.append_path 'app'

# Enable ESM
Opal::Config.esm = true

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'
  # need to set the index explicitly for opal server to pick it up
  s.index_path = 'index.html.erb'
}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 examples/rack-esm/config.ru
opal-1.8.2 examples/rack-esm/config.ru
opal-1.8.1 examples/rack-esm/config.ru
opal-1.8.0 examples/rack-esm/config.ru
opal-1.8.0.beta1 examples/rack-esm/config.ru
opal-1.7.4 examples/rack-esm/config.ru
opal-1.8.0.alpha1 examples/rack-esm/config.ru
opal-1.7.3 examples/rack-esm/config.ru
opal-1.7.2 examples/rack-esm/config.ru
opal-1.7.1 examples/rack-esm/config.ru
opal-1.7.0 examples/rack-esm/config.ru
opal-1.7.0.rc1 examples/rack-esm/config.ru
opal-1.6.1 examples/rack-esm/config.ru
opal-1.6.0 examples/rack-esm/config.ru
opal-1.6.0.rc1 examples/rack-esm/config.ru
opal-1.6.0.alpha1 examples/rack-esm/config.ru
opal-1.5.1 examples/rack-esm/config.ru
opal-1.5.0 examples/rack-esm/config.ru
opal-1.5.0.rc1 examples/rack-esm/config.ru
opal-1.4.1 examples/rack-esm/config.ru