[go: up one dir, main page]

Skip to content

zhanghui026/Play20

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Play 2.0 preview

If something goes wrong with the dependency management, fisrt try to delete the ~/.ivy2/cache directory!

Installing

Just checkout the git repository, and add the play script to your PATH. Everything is included.

Building

$ cd framework
$ ./build
> build-repository

Creating an application

Create a new directory for your application, and type play new.

$ mkdir myNewApp
$ play new

Running the Play console

Enter any Play application directory and type play.

$ cd myNewApp
$ play

Running your application in development mode

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.

Using SBT commands

SBT commands are available, including:

  • clean
  • compile
  • update
  • package

Starting the application in prod

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.

Packaging the application for standalone usage

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.

Releases

No releases published

Packages

No packages published