Running Webrick server in background?

前端 未结 4 871
故里飘歌
故里飘歌 2021-02-05 15:00
MBPro:shovell myname$ ruby script/server
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to         


        
4条回答
  •  盖世英雄少女心
    2021-02-05 15:35

    In general, you can use:

    command &
    

    And it will detach from the terminal window.

    If you are using Linux, another options is to use screen:

    screen
    # start your process
    # press Ctrl+a
    # press Ctrl+d
    

    Voila! It's detached. Then you can call screen -r and your process will be back as if nothing happened.

提交回复
热议问题