Your app is ready!

This is a template for a web application that uses the Play Framework. The sample code is a simple CRUD page that manipulates records for a single model object. To try it out go to the people page. Then use Eclipse or the Command Line to deploy some changes.

Using Eclipse 3.7:

Step 1. Setup your environment

  1. Ensure EGit is installed.
  2. Download and upzip the Play framework version 1.2.4.
  3. Create an SSH key if you haven't already:
    1. Go to Window Preferences General Network Connections SSH2
    2. Choose the Key Management tab
    3. Click Generate RSA Key... SSH Eclipse Preferences Window
    4. Copy the generated public key in the text box and add it to your account
    5. Click Save Private Key..., accepting the defaults
    6. Click Ok

Step 2. Clone the App

  1. Go to File Import... Git Projects from Git Import
  2. Choose URI and click Next
  3. Enter git@heroku.com:.git in the URI field. Clone Git Repository
  4. Click Next three times
    Click Yes to the question of authenticity if the question appears.
  5. Choose Import as general project Import Projects from Git
  6. Click Finish

Step 3. Configure the App

  1. Select the imported project
  2. Go to Run External Tools External Tools Configuration
  3. Double-click Program
  4. Enter the following values:
    • Name: Play Eclipsify
    • Location: Path to the play executable (or play.bat on Windows) in the Play directory unzipped above
    • Working Directory: ${project_loc}
    • Arguments: eclipsify
    Play Eclipsify External Tool Configuration
  5. Click Run
  6. Select the project and choose File Refresh

Step 4. Makes some changes to the app

  1. Open app/controllers/People.java and locate the index() method.
  2. To sort the person records by last name, change Person.findAll() to Person.find("ORDER BY lastName").fetch()
  3. Save the file.

Step 5. Deploy to Heroku

  1. Right-click the project root and choose Team Commit
  2. Enter a commit message and click Commit Commit Changes
  3. Right-click the project root and choose Team Push to Upstream
  4. Review the push results. At the bottom, a "... deployed to Heroku" message will appear. Push Results

Done!

You've just cloned, modified, and deployed a brand new app.

See your changes

Learn more at the Heroku Dev Center

Using Command Line:

Step 1. Setup your environment

  1. Install the Heroku Toolbelt.
  2. Download the Play framework version 1.2.4.
  3. Unzip the framework and add the directory to your PATH.

Step 2. Login to Heroku

heroku login
Be sure to create, or associate an SSH key with your account.
$ heroku login
Enter your Heroku credentials.
Email: playful@example.com
Password:
Could not find an existing public key.
Would you like to generate one? [Yn] Y
Generating new SSH public key.
Uploading SSH public key /Users/Administrator/.ssh/id_rsa.pub
Authentication successful.

Step 3. Clone the App

git clone -o heroku git@heroku.com:.git

Step 4. Makes some changes to the app

  1. Open app/controllers/People.java and locate the index() method.
  2. To sort the person records by last name, change Person.findAll() to Person.find("ORDER BY lastName").fetch()
  3. Save the file.

Step 5. Make sure the app still compiles

play clean precompile

Step 6. Deploy your changes

  1. git commit -am "New changes to deploy"
  2. git push heroku master

Done!

You've just cloned, modified, and deployed a brand new app.

See your changes

Learn more at the Heroku Dev Center