Sinatra 做簡單的ruby Server


最近有一個需求 就是用ruby寫一個簡單的備份Server

但是如果利用Rails來做的話, 就會覺得簡單的功能,用Rails 反而覺得太複雜了



nohup ruby web.rb >> log/file 2>&1 &


方式1:'', 'w') {|f| f.write }

shell: kill `cat`

ruby: Process.kill 'TERM','’)
ps aux | grep ruby $ kill <ruby-process-id>

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see