Skip to content

Commit

Permalink
Add diver_down_web to run web server
Browse files Browse the repository at this point in the history
  • Loading branch information
alpaca-tc committed Apr 1, 2024
1 parent da22816 commit 20cfb7a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion diver_down.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
Dir['lib/**/*'] + Dir['web/**/*'] + ['README.md', 'LICENSE.txt', 'CHANGELOG.md']
end
spec.bindir = 'exe'
spec.executables = []
spec.executables = ['diver_down_web']
spec.require_paths = ['lib']

spec.add_dependency 'activesupport', '>= 7.0.0'
Expand Down
12 changes: 12 additions & 0 deletions exe/diver_down_web
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require 'bundler/setup'
require 'rackup'
require 'webrick'
require 'diver_down'
require 'diver_down-web'

Rackup::Server.new(
app: DiverDown::Web.new(definition_dir: ENV.fetch('DIVER_DOWN_DIR'))
).start

0 comments on commit 20cfb7a

Please sign in to comment.