Typesafe Activator

Documentation

Create An Application Using the Web Interface

Once installed you can run Typesafe Activator's web interface either from a file browser or from a command line. From a file browser, double-click on either the activator (for Mac & Linux) or activator.bat (for Windows) script. From a command line, run the script with a ui argument:

Once you have selected a template and optionally entered a name and location, select the "Create" button to have your new application created.

Create An Application Using the Command Line

If you'd prefer to create a new application from a command line, run:

activator new

You will then be prompted to enter an application name and the template name to start with. The output will look similar to this:

Enter an application name
> hello-scala
The new application will be created in /home/typesafe/Desktop/hello-scala
Enter a template name, or hit tab to see a list of possible templates
>
hello-akka hello-play hello-scala reactive-stocks
> hello-scala
OK, application "hello-scala" is being created using the "hello-scala" template.
To run "hello-scala" from the command-line, run:
/home/typesafe/Desktop/hello-scala/activator run
To run the test for "hello-scala" from the command-line, run:
/home/typesafe/Desktop/hello-scala/activator test
To run the Activator UI for "hello-scala" from the command-line, run:
/home/typesafe/Desktop/hello-scala/activator ui

Open an Existing Application Using the Web Interface

Existing applications can be opened by running activator or activator.bat from a project's root directory. If the Activator UI is already running, then open http://localhost:8888/home in your browser and either select a known existing app, or folder icon next to Open existing app to browse to an existing app.

Working with Applications in the Activator UI

Once you have created or opened an application in the Activator UI you can:

Read the Tutorial

Browse & edit the code (select Code)

Open the code in IntelliJ IDEA or Eclipse (select Code then the gear icon)

See the compile output (select Compile)

Test the application (select Test)

Run the application (select Run)

Inspect the application (select Inspect)

Create a new application or open an existing one (select the application's name in the top left then select Manage Applications)

Whenever you save changes to a source file in the application, the changes will be recompiled, the application will be re-run, and the tests will be re-run.

Resources

License

Typesafe Activator is licensed under Apache License, Version 2.0; including the command-line Launcher, HTML & JavaScript UI, Play Framework based server, and all tests included in the project.
The templates available in Typesafe Activator are licensed individually by the owner. Refer to template source code or owner for license information.

Introducing Typesafe ConductR

A Reactive Application Manager for Operations

White Paper

Introducing the Typesafe Reactive Platform

Learn about the Typesafe technology ecosystem

Typesafe Activator FAQ

Re-Launching Activator

To make it easy to re-launch Activator (either from a file browser or command line) after you've shut it down, you can either launch it the same way you did the first time, or you can launch it from the new application's root directory. If you launch it from the application's root directory then the UI will automatically launch with the application open. Otherwise you will need to open the existing application. To make it easy for others to launch Activator for your application you can put the activator, activator.bat, and activator-launch-VERSION.jar files in your SCM.

Behind a proxy

When running activator behind a proxy, some additional configuration is needed. First, open the activator configuration file,
found in your user home directory
under ~/.activator/activatorconfig.txt. Note
that this file may not exist. Add the
following lines (one option per line):

The above configuration will affect the Activator
application, but not the sbt server process
launched by Activator. To affect the sbt server
process, copy activatorconfig.txt
to ~/.sbt/jvmargs. ~/.sbt/jvmargs
contains options for the sbt server process, one
per line.

Proxy configuration goes in two places because
Activator and sbt server are distinct applications.

Increasing the Timeout

By default Activator has a 10 second timeout to fetch the latest templates and check for a new version. On slow internet connections it might be necessary to increate that timeout. You can do that from the command line by including a -Dactivator.timeout=30s parameter or by putting that parameter into your ~/.activator/activatorconfig.txt file.

Increase Activator Logging Verbosity

If you are having problems with Activator you can try to increase the logging verbosity from the command line by including a -Dakka.loglevel=DEBUG parameter or by putting that parameter into your ~/.activator/activatorconfig.txt file.

Activator spawns an sbt server process, which
logs to
the <projectdir>/.sbtserver
directory (<projectdir> is the
application's source directory). Some problems
may be best debugged by reviewing the sbt server logs.

Under the Covers

Activator applications use sbt under the covers. This means that anything you can do in sbt you can do with an application in Activator. For instance, sbt plugins can easily be added to applications in Activator just like they would normally be added.

Use the search/command bar in the UI

You can either search for files in the project,
or execute sbt tasks commands (with autocomplete).

Why do I see the echo:* in my task list?

Echo is the project name for Activator's
Inspect. Tasks that start with echo:
are in the "Echo" build configuration, and relate to
running Activator with Inspect's instrumentation
added.

Why does Activator use backgroundRun instead of plain run?

In Activator, tasks are executed sequentially. However, `run` is a blocking task which would lock up the sbt engine that powers Activator. `backgroundRun` allows you to still `test` or `compile` while your app is running.

Can the code editor...?

The code editor is not meant to replace an
IDE. It will probably never cover all your needs,
but should be sufficient for many cases such as:
training classes, presentations, demos ...

How to use the Inspector?

The inspector (found on the Run tab) allows you to extract information at runtime about your application. In the `run` tab, you can activate Inspect in the left menu. It will add the `echo` plugin to your project, then reload. From there, execute the 'run' command (by clicking the run button, or running it from the search bar).

As of today, you can inspect:

Your actors: Basic informations about the Akka system;

Actor errors: Get a complete stack trace for each Akka error;

Play requests: Summary of each request made on the server;

How to use the third-party monitoring tools?

Open the `monitoring` tab in the left navigation. From there you can, as of today, choose to add AppDynamics or NewRelic. Follow the inline instruction to configure them.

From the blog

At Typesafe, we have already partnered with quite a few consulting firms to provide professional services to companies looking to Go Reactive. In doing so, we ask each of our partner candidates to put together a Typesafe Activator template that showcases their skills, capabilities and quality of work. However, that doesn't give us much visibility into the specific strengths each firm brings to the table. To help provide that visibility, we recently created a capabilities model for partners that reflects the many different aspects of our technologies...

Typesafe Deputy CTO Viktor Klang goes into the world of microservices to see how these architectures emerge from the constraints of reality. Viktor reviews the problems imposed by reality, and shows how they can not only be solved, but how the constraints free us from misconceptions that are otherwise very easy to acquire. We also explore how distributed systems are at the heart of microservices-based architectures and how communication shapes the structure, behavior and development of the software...