Lightbend Activator

Play Scala Seed

Activator will be EOL-ed on May 24, 2017.

We’re making it easier and simpler for developers to get started with Lightbend technologies. This unfortunately means that future releases of Play, Akka and Scala will no longer include Activator support, and Lightbend’s Activator server will be decommissioned by the end of 2017. Instead of supporting Activator to create and set up development projects, we'll be supporting standard Giter8 templates for sbt users and Maven archetypes for Maven users. So going forward,

To create new Lightbend projects

Instead of using the Activator command, make sure you have sbt 0.13.13 (or higher), and use the “sbt new” command, providing the name of the template. For example, “$ sbt new akka/hello-akka.g8”. You can find a list of templates here.

Also, as a convenience, the Lightbend Project Starter allows you to quickly create a variety of example projects that you just unzip and run.

To create new templates

If you want to create new templates, you can now do that in Giter8.

To migrate templates from Activator to Giter8

If you created Activator templates in the past, please consider migrating them to Giter8 with this simple process.

Play Scala Seed

November 18, 2016
playframework scala seed

Seed for starting a new Play Scala project

How to get "Play Scala Seed" on your computer

There are several ways to get this template.

Option 1: Choose play-scala in the Lightbend Activator UI.

Already have Lightbend Activator (get it here)? Launch the UI then search for play-scala in the list of templates.

Option 2: Download the play-scala project as a zip archive

If you haven't installed Activator, you can get the code by downloading the template bundle for play-scala.

  1. Download the Template Bundle for "Play Scala Seed"
  2. Extract the downloaded zip file to your system
  3. The bundle includes a small bootstrap script that can start Activator. To start Lightbend Activator's UI:

    In your File Explorer, navigate into the directory that the template was extracted to, right-click on the file named "activator.bat", then select "Open", and if prompted with a warning, click to continue:

    Or from a command line:

     C:\Users\typesafe\play-scala> activator ui 
    This will start Lightbend Activator and open this template in your browser.

Option 3: Create a play-scala project from the command line

If you have Lightbend Activator, use its command line mode to create a new project from this template. Type activator new PROJECTNAME play-scala on the command line.

Option 4: View the template source

The creator of this template maintains it at

Option 5: Preview the tutorial below

We've included the text of this template's tutorial below, but it may work better if you view it inside Activator on your computer. Activator tutorials are often designed to be interactive.

Preview the tutorial

Welcome to Play 2.5.10

Congratulations, you’ve just created a new Play application!

Play Framework makes it easy to build web applications with Java & Scala. Play is based on a lightweight, stateless, web-friendly architecture. Built on Akka, Play provides predictable and minimal resource consumption for highly-scalable applications.

This tutorial introduces you to the essentials of your new Play application.

Run Your Application

Before we go any further, let's run the application.

  1. Go to the Run page.
  2. Click Run to start the application (if needed).
  3. View the running application at http://localhost:9000.

Actions, Controllers and Results

In Play, web requests are handled by Actions.

Actions process each request, perform any work that's needed, and then return a Result. Actions are generated by Controllers.

This application defines a Controller in app/controllers/HomeController.scala. HomeController's index method creates an Action which returns a Result of Ok.

Learn about Actions, Controllers and Results

HTTP Routing

Play routes incoming HTTP requests to their Actions. The mappings between requests and Actions are defined in conf/routes.

Learn about HTTP Routing

Twirl Templates

This application renders HTML using Twirl templates.

The templates are defined in the app/views directory. Each Twirl template is compiled into a Scala object which can be called from Java or Scala code.

The views.html.index(...) code within HomeController.scala calls the app/views/index.scala.html template.

Twirl ships with Play by default but you can use other view technologies too. For example, you could use Handlebars instead of Twirl.

Learn about Twirl Templates

Static Assets

Your application automatically serves static resources such as JavaScript, CSS and images.

Normal assets live in the public folder.

Assets that need compilation, such as CoffeeScript and LESS files, go in the app/assets folder. These assets have extra processing applied to them.

Assets are served by Play's Assets controller. The Assets controller is configured in the conf/routes file.

Learn about Working with Assets

Build System

Your Play application is built with sbt.

Build configuration is defined in the build.sbt file. You can edit this file to add new project dependencies or to change compilation settings.

Plugins extend sbt with new behavior. You can set up sbt plugins in the project/plugins.sbt file. The Play sbt plugin is configured in this file. There are also separate plugins to compile assets, such as CoffeeScript and LESS.

Learn about the Build System

Runtime Configuration

You can change your application's runtime behavior by editing conf/application.conf file. There are lots of commented-out settings in there for you to use as a starting point.

Play uses the Typesafe Config Library to manage its configuration. Editing the application.conf file is just one of many ways that you can configure your application.

Learn about Configuration

Command Line

You're probably reading this tutorial right now from within Lightbend Activator's browser UI. However, if you prefer, you can build and run your application from the command line.

$ activator ~run

You can run tests from the command line too.

$ activator ~test

Learn about the Play console

More Information

General information about Play is available from

There is documentation available online.

You can also ask questions on Stack Overflow.