-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.rb
More file actions
35 lines (24 loc) · 750 Bytes
/
app.rb
File metadata and controls
35 lines (24 loc) · 750 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
# frozen_string_literal: true
# => ruby app.rb
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'rackup'
gem 'rails'
gem 'webrick'
gem 'tiny_admin', path: '../../'
end
require 'action_controller/railtie'
require_relative '../tiny_admin_settings'
class RailsApp < Rails::Application
routes.append do
root to: proc { [200, {}, ['Root page - go to /admin for TinyAdmin']] }
mount TinyAdmin::Router => '/admin'
end
config.action_dispatch.show_exceptions = :none
config.active_support.cache_format_version = 7.1
config.consider_all_requests_local = false
config.eager_load = false
end
RailsApp.initialize!
Rackup::Server.new(app: RailsApp, Port: 3000).start if __FILE__ == $PROGRAM_NAME