Sha256: 07cab560a73e2a24298d838afebd5008f47107ea9073139e23f94c11567cd358
Contents?: true
Size: 855 Bytes
Versions: 4
Compression:
Stored size: 855 Bytes
Contents
module Inesita class Server def initialize(*args, &block) server = server(*args, &block) @rack = Rack::Builder.new do use Rack::Static, urls: [Inesita::Config::STATIC_DIR] run server end Opal.append_path 'app' Inesita.assets_code = assets_code end def call(*args) @rack.call(*args) end def assets_code(path = 'application') @server.javascript_include_tag(path) end def server(*args, &block) @server = if block_given? Opal::SimpleServer.new(*args, &block) else Opal::SimpleServer.new(*args) do |server| server.main = ::Inesita::Config::SERVER_MAIN server.index_path = ::Inesita::Config::SERVER_INDEX_PATH end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
inesita-1.0.pre.7 | lib/inesita/server.rb |
inesita-1.0.pre.6 | lib/inesita/server.rb |
inesita-1.0.pre.5 | lib/inesita/server.rb |
inesita-1.0.pre.4 | lib/inesita/server.rb |