underscoreio/essential-play-code

Name: essential-play-code

Owner: Underscore

Description: Exercises and solutions for Underscore's Essential Play

Created: 2015-01-30 16:40:39.0

Updated: 2018-04-29 16:53:08.0

Pushed: 2017-09-17 21:34:57.0

Homepage: http://underscore.io/training/courses/essential-play

Size: 2158

Language: Scala

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Essential Play Code

This repository contains exercises and solutions for Underscore's Essential Play book and training course.

If you want to discuss the content or exercises with the authors, join us in our chat room on Gitter:

Gitter

Using the Source Code

This repository contains two branches: one for exercises and one for solutions. The directory structure is the same in each branch, with each exercise stored as a standalone Play project in its own directory.

You will need to have Git and Java and an internet connection to run the exercises. All other dependendencies are either included with the projects or downloaded on demand during compilation.

See below for quick getting started instructions. For more detailed instructions see Chapter 1 of the book.

Note on Using Scala IDE

Older versions of this repo shipped with the sbteclipse plugin to make it easier to set up Scala IDE.

Current best practices recommend installing sbteclipse as a global plugin. I have removed it deom from this repo because it was causing conflicts for people who were doing the right thing.

See the sbteclipse documentation for instructions on installing it as a global plugin.

Getting Started on Linux or OS X

Complete the following steps outlined in Chapter 1 in the section entitled “Setting up SBT for This Book”:

  1. Clone this repository to a directory on your hard drive, e.g. C:\essential-play-code:

    $ git clone https://github.com/underscoreio/essential-play-code.git
    
  2. Change to the directory for the “hello world” exercise:

    $ cd essential-play-code/chapter1-hello
    
  3. Run the sbt.sh script. You may have to wait while SBT downloads various dependencies:

    $ ./sbt.sh
    ts of output here...
    e first run will take a while...
    
    ] $
    
  4. Type run at the SBT prompt. You may have to wait while SBT downlaods various dependencies:

    ] $ run
    ts of output here...
    e first run will take a while...
    
    (Running the application from SBT, auto-reloading is enabled) ---
    
    o] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
    
    ver started, use Ctrl+D to stop and go back to the console...)
    
  5. Open http://localhost:9000 in a web browser. SBT will compile the application, which may take a while. After this you should see the message "Hello World!" in your browser.

    ] $ run
    ts of output here...
    e first run will take a while...
    
    (Running the application from SBT, auto-reloading is enabled) ---
    
    o] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
    
    ver started, use Ctrl+D to stop and go back to the console...)
    
Getting Started on Windows

You will need to have installed Git and Java (we recommend Oracle's Java 7 SDK). Complete the following steps outlined in Chapter 1 in the section entitled “Setting up SBT for This Book”:

  1. Clone this repository to a directory on your hard drive, e.g. C:\essential-play-code:

     git clone https://github.com/underscoreio/essential-play-code.git ?
              C:\essential-play-code
    
  2. Change to the directory for the “hello world” exercise:

     cd\essential-play-code\chapter1-hello
    
  3. Run the sbt.bat script. You may have to wait while SBT downloads various dependencies:

    ssential-play-code> sbt
    ts of output here...
    e first run will take a while...
    
    ] $
    
  4. Type run at the SBT prompt. You may have to wait while SBT downlaods various dependencies:

    ] $ run
    ts of output here...
    e first run will take a while...
    
    (Running the application from SBT, auto-reloading is enabled) ---
    
    o] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
    
    ver started, use Ctrl+D to stop and go back to the console...)
    
  5. Open http://localhost:9000 in a web browser. SBT will compile the application, which may take a while. After this you should see the message "Hello World!" in your browser.

    ] $ run
    ts of output here...
    e first run will take a while...
    
    (Running the application from SBT, auto-reloading is enabled) ---
    
    o] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
    
    ver started, use Ctrl+D to stop and go back to the console...)
    

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.