Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running SBT as Daemon

Tags:

scala

sbt

I have an SBT scala application that runs fine using "sbt run". However, this locks up the console, and I'd rather start it as a service/daemon so that I can use the console, and also so that I can add it to init.d to ensure that my application is started automatically on startup.

I can't seem to find a way to do this. Running "sbt run &" seems to hang the app in the background.

Does anybody know how to do this?

like image 714
devinfoley Avatar asked May 14 '11 07:05

devinfoley


1 Answers

You could also jar up your application into a "fat" jar using either sbt-assembly or sbt-onejar.

This will make it an executable jar and easily runnable via java -jar jarname.jar.

like image 142
Luke Amdor Avatar answered Oct 06 '22 06:10

Luke Amdor