markdownr 0.5.13 → 0.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/markdownr +6 -1
- data/lib/markdown_server/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f80b8ab8eaa610c955ccd7838ed37f02d900c9e73ce64e52c163b4992a9be5a0
|
|
4
|
+
data.tar.gz: 2e26441fbcf5355977e3393b1948b39af22c07301317355627a48252fd394768
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0639cf0ff09aec6ad21db709b8d8a2a6f98780ad26d3602beaba00b736f877fe81622113c283caf2ecee5f431dffc542c1ac00095905e85219d43766e94049a2'
|
|
7
|
+
data.tar.gz: a1846784c14a99b559cad1314260b09dfff5aeeda243dac14d2e2c78f5f619b030a54a225305827fa5a4042b3a11a12e29e946c3e985b22bdaf4f1959e074f0f
|
data/bin/markdownr
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
require "optparse"
|
|
3
3
|
require_relative "../lib/markdown_server"
|
|
4
4
|
|
|
5
|
-
options = { port: 4567, bind: "127.0.0.1" }
|
|
5
|
+
options = { port: 4567, bind: "127.0.0.1", threads: 5 }
|
|
6
6
|
|
|
7
7
|
OptionParser.new do |opts|
|
|
8
8
|
opts.banner = "Usage: markdownr [options] [directory]"
|
|
@@ -23,6 +23,10 @@ OptionParser.new do |opts|
|
|
|
23
23
|
options[:allow_robots] = true
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
+
opts.on("-T", "--threads N", Integer, "Number of server threads (default: 5)") do |n|
|
|
27
|
+
options[:threads] = n
|
|
28
|
+
end
|
|
29
|
+
|
|
26
30
|
opts.on("--behind-proxy", "Trust X-Forwarded-For for client IP (use when behind a reverse proxy like Caddy)") do
|
|
27
31
|
options[:behind_proxy] = true
|
|
28
32
|
end
|
|
@@ -62,6 +66,7 @@ MarkdownServer::App.set :link_tooltips, options.fetch(:link_tooltips, true)
|
|
|
62
66
|
MarkdownServer::App.set :hard_wrap, options.fetch(:hard_wrap, true)
|
|
63
67
|
MarkdownServer::App.set :port, options[:port]
|
|
64
68
|
MarkdownServer::App.set :bind, options[:bind]
|
|
69
|
+
MarkdownServer::App.set :server_settings, { max_threads: options[:threads], min_threads: 1 }
|
|
65
70
|
|
|
66
71
|
puts "Serving #{dir} on http://#{options[:bind]}:#{options[:port]}/"
|
|
67
72
|
MarkdownServer::App.run!
|