How to respond to a simple ruby ββrack server with a JSON object, suggests that the mt server is something like:
app = Proc.new do |env|
[200, { 'Content-Type' => 'text/plain' }, ['Some body']]
end
Rack::Handler::Thin.run(app, :Port => 4001, :threaded => true)
and suppose instead of plain text, I want a JSON object with something like:
{
"root": [
{
"function": null
}
]
}
thank
Eqbal source
share