We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent eb5905b commit 3b7a66dCopy full SHA for 3b7a66d
examples/sinatra/config.ru
@@ -1,6 +1,19 @@
1
require 'opal'
2
require 'sinatra'
3
4
+opal = Opal::Server.new {|s|
5
+ s.append_path 'app'
6
+ s.main = 'application'
7
+}
8
+
9
+map '/__opal_source_maps__' do
10
+ run opal.source_maps
11
+end
12
13
+map '/assets' do
14
+ run opal.sprockets
15
16
17
get '/' do
18
<<-EOS
19
<!doctype html>
@@ -12,10 +25,4 @@ get '/' do
25
EOS
26
end
27
-map '/assets' do
- env = Opal::Environment.new
- env.append_path 'app'
- run env
-end
20
-
21
28
run Sinatra::Application
0 commit comments