Search code examples
scaladeploymentintellij-ideamongodbcasbah

deploying a scala app built using IDEA


I developed a simple scala app that uses casbah to query the DB for the command line argument passed to it. For example

$ querydb.scala execution 10

it will run a casbah query to find 10 records matching execution in mongo. Now i have two questions.

1) How do i test this in my local. If i click execute in intellij it is just running the program, i am not able to pass command line arguments to my program.

2) How do i deploy it to run on my server, it is just going to used as console app in my ubuntu server, but im not sure how i should deploy this, which files i should put up on the server and how do i execute it in server, and stuff like that.

Any pointers would be useful for me.


Solution

  • or try to use sbt, IDEA has a plugin with sbt, the wiki of it has an explanation on how to use it. I usually use sbt directly in Terminal instead of running in IDE.