Search code examples
shellclojureleiningenring

how I can start lein ring server in background?


Now what I do is:

$ lein ring server &

Then what I see is: [1]+ Stopped lein ring server. Then I'm trying to use:

$ fg 1

And also see that it's stopped. What do I do wrong and how can I run ring as a background process?


Solution

  • As lein simply launches a Java process, this answer of course does not apply to ring/leiningen only.

    The simplest way might be to use one of the following Linux/UNIX utilities (and some more as well):

    • screen
    • detachtty
    • nohup