Monday, April 13, 2015

How to install play framework on mac

@ Download and decompress the zip file.
$ http://downloads.typesafe.com/play/2.2.6/play-2.2.6.zip

@ Change the current directory for the existing Play application directory.
$ cd /Users/user_account/play

@ Generate new project[enter]
$ ./play new HelloWorld
       _
 _ __ | | __ _ _  _
| '_ \| |/ _' | || |
|  __/|_|\____|\__ /
|_|            |__/

play 2.2.6 built with Scala 2.10.3 (running Java 1.7.0_45), http://www.playframework.com

The new application will be created in /Users/user_account/play-2.2.6/HelloWorld

What is the application name? [HelloWorld]

>   

@ Select the option[2]
Which template do you want to use for this new application?

  1             - Create a simple Scala application
  2             - Create a simple Java application

> 2

@ Completed
OK, application HelloWorld is created.

Have fun!

@ Changed the current directory.
$ cd HelloWorld/

@ Execute play.[play]
$ play
Getting org.scala-sbt sbt 0.13.0 ...
:: retrieving :: org.scala-sbt#boot-app
	confs: [default]
	43 artifacts copied, 0 already retrieved (12440kB/261ms)
[info] Loading project definition from /Users/user_account/play-2.2.6/HelloWorld/project
[info] Set current project to HelloWorld (in build file:/Users/kim_woongjoon/play-2.2.6/HelloWorld/)
       _
 _ __ | | __ _ _  _
| '_ \| |/ _' | || |
|  __/|_|\____|\__ /
|_|            |__/

play 2.2.6 built with Scala 2.10.3 (running Java 1.7.0_45), http://www.playframework.com

> Type "help play" or "license" for more information.
> Type "exit" or use Ctrl+D to leave this console.

[HelloWorld] $ 

@ Run HelloWorld project[run]
[HelloWorld] $ run
[info] Updating {file:/Users/user_account/play-2.2.6/HelloWorld/}helloworld...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.

--- (Running the application from SBT, auto-reloading is enabled) ---

[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

(Server started, use Ctrl+D to stop and go back to the console...)

@ Connect http://localhost:9000/ on your browser.

No comments:

Post a Comment