Skip to content

Commit 43ba3fe

Browse files
committed
First commit.
1 parent 03eca02 commit 43ba3fe

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

puma_test/config.ru

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require 'rack'
2+
3+
i = 0
4+
app = Proc.new do |env|
5+
res = ['200', {'Content-Type' => 'text/html'}, ["#{i}"]]
6+
i += 1
7+
res
8+
end
9+
10+
run app

puma_test/puma.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require "puma"
2+
3+
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
4+
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
5+
threads threads_count, threads_count
6+
7+
rackup DefaultRackup
8+
port ENV['PORT'] || 8080
9+
environment ENV['RACK_ENV'] || 'development'

server.gb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
require("net/simple_server")
2+
3+
server = Net::SimpleServer.new("3000")
4+
5+
i = 0
6+
7+
server.mount("/") do |req, res|
8+
res.body = i.to_s
9+
i++
10+
end
11+
12+
server.start

0 commit comments

Comments
 (0)