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
This will start a local web server that can be reached at: http://localhost:8888
Inside your browser you can now create a new application based on one of the 94 templates. Both Typesafe and the community have contributed templates to Activator. Learn more about how to contribute your own template.
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:
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.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.
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-launch-VERSION.jar files in your SCM.
Behind a proxy
When running activator behind a proxy, some additional configuration is needed. First, we need to open the activator configuration file,
found in your user home directory under
~/.activator/activatorconfig.txt. Note that this file may not exist. Once you have
the file open and ready to configure, we need to make sure it has the following lines:
# This are the proxy settings we use for activator -Dhttp.proxyHost=PUT YOUR PROXY HOST HERE -Dhttp.proxyPort=PUT YOUR PROXY PORT HERE # Here we configure the hosts which should not go through the proxy. You should include your private network, if applicable. -Dhttp.nonProxyHosts="localhost|127.0.0.1" # These are commented out, but if you need to use authentication for your proxy, please fill these out. #-Dhttp.proxyUser=PUT YOUR PROXY USER HERE #-Dhttp.proxyPassword=PUT YOUR PROXY PASSWORD HERE
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
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
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.
The templates available in Typesafe Activator are licensed individually by the owner. Refer to template source code or owner for license information.