Created
May 9, 2012 19:47
-
-
Save phaus/2648311 to your computer and use it in GitHub Desktop.
HowTo Setup a Play! Framework App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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