0xSina
0xSina

Reputation: 21553

run thin outside of shell

I am using thin to run my Sinatra app but right now, when I close the shell, the server stops. Is it possible to run it as a process in the background and also see/minitor the logs like I do in shell?

Upvotes: 1

Views: 199

Answers (2)

user904990
user904990

Reputation:

As @Chris mentioned, you can daemonize it.

Another way is to use GNU Screen

This way you can run your app in foreground and yet close your terminal.

When you get back into Screen session you have same environment,
just like when you switch terminal tabs.

Upvotes: 1

Chris Heald
Chris Heald

Reputation: 62648

Use the -d switch to start it daemonized. It'll write output to log/thin.log by default, or you can overwrite that with the -l switch. See thin -h for a full list of options.

Upvotes: 3

Related Questions