I am working on a project where I have to save some temporary user generated files on the file system. In my dev environment I created a folder called
You are getting correct root folder. The sense of
start command is to verify how your application will run in production. So it build application, like you will do when you will push it to prod. And then "deploy it to prod" - unpack it to the
target/universal/stage folder and run application from that folder. So
target/universal/stage is your correct root folder.
Take in to attention - start command is deprecated:
[warn] The start command is deprecated, and will be removed in a future version of Play.
[warn] To run Play in production mode, run 'stage' instead, and then execute the generated start script in target/universal/stage/bin.
[warn] To test your application using production mode, run 'testProd' instead.
You need to add to the
build.sbt next code
mappings in Universal ++= (baseDirectory.value / "usr" * "*" get) map (x => x -> ("usr/" + x.getName))
This will say to sbt to add your "usr" folder to the "production package" (stage). Take in to attention - it will not "link", it will hard copy
usr folder to the
target/universal/stage so you will have
target/universal/stage/usr that is copy of
usr just before you run command