Skip to content

Instantly share code, notes, and snippets.

@phaus
Created May 9, 2012 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phaus/2648311 to your computer and use it in GitHub Desktop.
Save phaus/2648311 to your computer and use it in GitHub Desktop.
HowTo Setup a Play! Framework App
Download http://download.playframework.org/releases/play-2.0.1.zip and unzip it to your OSs optional Folder (e.g. /opt)
https://gist.github.com/
Add the script "play" to your Path.
Go into your play app and run
"play run"
(you can also use play start/stop for running the app in the background, then play status gives you an overview over the current app status)
a common output looks like:
> Listening for transport dt_socket at address: 8080
> 21:05:54,086 INFO ~ Starting /Users/philipp/SVN/innoQ-sandbox-phl/playframework/flowcontrol
> 21:05:54,298 INFO ~ Module scaffold is available (/usr/local/play-1.2.4/modules/scaffold-0.1)
> 21:05:58,980 WARN ~ You're running Play! in DEV mode
> 21:05:59,400 INFO ~ Listening for HTTP on port 9090 (Waiting a first request to start) ...
You need go to http://localhost:9090 (9090 is the port from the output)
> 21:16:36,085 INFO ~ ApiPlugin loaded
> 21:16:38,959 INFO ~ Connected to jdbc:h2:/Users/philipp/SVN/innoQ-sandbox-phl/playframework/flowcontrol/db/h2/play;MODE=MYSQL
> 21:16:40,142 INFO ~ Application 'flowcontrol' is now started !
> 21:16:40,272 INFO ~ Bootstrap Job
The Line with "Connected to" gives you the SQLite connection.
If you go to http://localhost:9090/@db you will be redirected to the SQLite-Web-ui
You just need to change JDBC URL to
jdbc:h2:/Users/philipp/SVN/innoQ-sandbox-phl/playframework/flowcontrol/db/h2/play
The User is sa, the password is empty.
There are some CheatSheets for play:
http://www.playframework.org/documentation/1.2.4/cheatsheet/model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment