If something goes wrong with the dependency management, fisrt try to delete the ~/.ivy2/cache directory!
Just checkout the git repository, and add the play
script to your PATH. Everything is included.
$ cd framework
$ ./build
> build-repository
Create a new directory for your application, and type play new
.
$ mkdir myNewApp
$ play new
Enter any Play application directory and type play
.
$ cd myNewApp
$ play
In the Play console just type run
, and the server will start on port 9000. Then go to http://localhost:9000/ to see the application.
In development mode, the project compilation will be automatically triggered when you refresh your browser. Any compilation error will be reported in the browser. Runtime errors and template errors should be correctly reported as well.
Type Ctrl+D
to stop the server and come back to the Play console.
SBT commands are available, including:
- clean
- compile
- update
- package
From the Play console, type play start
. It will fork a new JVM and start the application in production mode. The application logs are displayed until you type Ctrl+D
; then you will exit the Play console, and the server will keep running in background. You can also type Ctrl+C
to kill both the console and the server.
From the Play console, type play dist
. It will package your application including all dependencies as a zip file in the /dist directory. Unzip this directory anywhere and use the run
script to start the application.