-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.rb
More file actions
45 lines (35 loc) · 684 Bytes
/
server.rb
File metadata and controls
45 lines (35 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
require 'sinatra'
configure { set :server, :puma }
get '/' do
send_file "index.html"
end
get '/sample4.jpg' do
content_type 'application/octet-stream'
send_file "sample4.jpg"
end
get '/normal' do
send_file "index2.html"
end
get '/image' do
send_file "index2.html"
end
get '/binary' do
# content_type 'application/octet-stream'
send_file "output"
end
get '/video' do
send_file 'video_stream.html'
end
get '/video2' do
send_file 'video_stream2.html'
end
get '/video.webm' do
content_type 'application/octet-stream'
send_file 'video.webm'
end
get '/base64' do
send_file 'using_base64.html'
end
get '/sample2.jpg' do
send_file 'sample.jpg'
end