简体   繁体   English

在后台运行开发模式中的play框架

[英]Running the play framework in development mode in the background

I need to find a way to run the play framework in development mode (the usual 'play run' command) but have it run in the background instead of being attached to a terminal. 我需要找到一种方法来在开发模式下运行play框架(通常的'play run'命令),但是它在后台运行而不是连接到终端。 Unfortunately 'play run &' doesn't seem to work, the process stops instead of running and my app never works. 不幸的是'play run&'似乎不起作用,该过程停止而不是运行,我的应用程序永远不会工作。 I'm not sure why this is, just using play run and keeping the interactive terminal open works fine, but I also need to be able to run this in the background for automated deployment of development machines. 我不确定为什么会这样,只是使用play run并保持交互式终端打开工作正常,但我还需要能够在后台运行它以自动部署开发机器。

How about screen as a workaround: screen如何解决方法:

screen -S play -d -m sbt run

It'll terminate when sbt quits, or you can attach to it with screen -r play 当sbt退出时它会终止,或者你可以通过screen -r play来附加它

I'm pretty sure tmux would work too. 我很确定tmux也会起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM