Skip to content
Play Scala Starter Template (ideal for new users!)
Branch: 2.7.x
Clone or download
dwijnand Upgrade branch 2.7.x using TemplateControl (#124)
```
Updated with template-control on 2019-03-14T11:11:39.685584Z
  /.mergify.yml:
    wrote /.mergify.yml

```
Latest commit c1814cc Mar 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Upgrade branch 2.7.x using TemplateControl (#122) Feb 15, 2019
app Change user action from clicking to refreshing (#99) Feb 8, 2019
conf Updated with template-control on 2018-04-06T19:34:58.606Z (#83) Apr 7, 2018
gradle/wrapper Updated with template-control on 2018-08-20T20:37:14.070Z (#92) Aug 20, 2018
project Updated with template-control on 2019-02-01T15:33:48.448Z (#118) Feb 1, 2019
public Upgrade branch SNAPSHOT using TemplateControl (#28) Apr 13, 2017
scripts
test Add Gradle configuration and Java 9 support (#64) Dec 20, 2017
.gitignore
.mergify.yml Upgrade branch 2.7.x using TemplateControl (#124) Mar 14, 2019
.travis.yml
LICENSE
NOTICE Updated with template-control on 2019-01-10T23:19:31.048Z (#114) Jan 10, 2019
README.md Improve README (#96) Oct 14, 2018
build.gradle Updated with template-control on 2019-02-01T15:33:48.448Z (#118) Feb 1, 2019
build.sbt
gradlew Add Gradle configuration and Java 9 support (#64) Dec 20, 2017
gradlew.bat

README.md

play-scala-starter-example

This is a starter application that shows how Play works. Please see the documentation at https://www.playframework.com/documentation/latest/Home for more details.

Running

Run this using sbt. If you downloaded this project from http://www.playframework.com/download then you'll find a prepackaged version of sbt in the project directory:

sbt run

And then go to http://localhost:9000 to see the running web application.

There are several demonstration files available in this template.

Controllers

  • HomeController.scala:

    Shows how to handle simple HTTP requests.

  • AsyncController.scala:

    Shows how to do asynchronous programming when handling a request.

  • CountController.scala:

    Shows how to inject a component into a controller and use the component when handling requests.

Components

  • Module.scala:

    Shows how to use Guice to bind all the components needed by your application.

  • Counter.scala:

    An example of a component that contains state, in this case a simple counter.

  • ApplicationTimer.scala:

    An example of a component that starts when the application starts and stops when the application stops.

Filters

  • Filters.scala:

    Creates the list of HTTP filters used by your application.

  • ExampleFilter.scala:

    A simple filter that adds a header to every response.

You can’t perform that action at this time.