add ca service
This commit is contained in:
parent
ca5d4c4b72
commit
8bbf7d31a5
10 changed files with 87 additions and 3 deletions
6
bin/services/ca/Gemfile
Normal file
6
bin/services/ca/Gemfile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
ruby ">= 3.0"
|
||||
gem "roda"
|
||||
gem "puma"
|
||||
gem "rackup"
|
||||
26
bin/services/ca/Gemfile.lock
Normal file
26
bin/services/ca/Gemfile.lock
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
nio4r (2.7.4)
|
||||
puma (6.6.1)
|
||||
nio4r (~> 2.0)
|
||||
rack (3.2.0)
|
||||
rackup (2.2.1)
|
||||
rack (>= 3)
|
||||
roda (3.95.0)
|
||||
rack
|
||||
|
||||
PLATFORMS
|
||||
arm64-darwin-24
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
puma
|
||||
rackup
|
||||
roda
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.4.5p51
|
||||
|
||||
BUNDLED WITH
|
||||
2.6.9
|
||||
12
bin/services/ca/app.rb
Normal file
12
bin/services/ca/app.rb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
require "roda"
|
||||
|
||||
class App < Roda
|
||||
# automatically sets application/json and encodes Ruby objects
|
||||
plugin :json
|
||||
|
||||
route do |r|
|
||||
r.get "hello" do
|
||||
{ message: "world" }
|
||||
end
|
||||
end
|
||||
end
|
||||
2
bin/services/ca/config.ru
Normal file
2
bin/services/ca/config.ru
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require_relative "app"
|
||||
run App.freeze.app
|
||||
0
bin/services/ca/make
Executable file
0
bin/services/ca/make
Executable file
9
bin/services/ca/readme.md
Normal file
9
bin/services/ca/readme.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
bundle exec rackup -p 9292 -o 0.0.0.0
|
||||
|
||||
|
||||
|
||||
RACK_ENV=production bundle exec rackup -p 8080 -o 0.0.0.0
|
||||
|
||||
|
||||
curl http://0.0.0.0:9292/hello --verbose
|
||||
Loading…
Add table
Add a link
Reference in a new issue