-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.rb
More file actions
31 lines (22 loc) · 508 Bytes
/
app.rb
File metadata and controls
31 lines (22 loc) · 508 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
# frozen_string_literal: true
# => ruby app.rb
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'rackup'
gem 'roda'
gem 'webrick'
gem 'tiny_admin', path: '../../'
end
require_relative '../tiny_admin_settings'
class RodaApp < Roda
route do |r|
r.root do
'Root page - go to /admin for TinyAdmin'
end
r.on 'admin' do
r.run TinyAdmin::Router
end
end
end
Rackup::Server.new(app: RodaApp, Port: 3000).start if __FILE__ == $PROGRAM_NAME