2011-12-12 12:27:45 +01:00
|
|
|
.. _http-module:
|
|
|
|
|
|
|
|
|
|
HTTP
|
2012-05-21 14:40:18 +02:00
|
|
|
####
|
2011-12-12 12:27:45 +01:00
|
|
|
|
2012-05-21 14:40:18 +02:00
|
|
|
Play2 Mini
|
|
|
|
|
==========
|
2011-12-12 12:27:45 +01:00
|
|
|
|
2012-05-21 14:40:18 +02:00
|
|
|
The Akka team recommends the `Play2 Mini <https://github.com/typesafehub/play2-mini>`_ framework when building RESTful
|
2012-02-12 23:09:47 +01:00
|
|
|
service applications that integrates with Akka. It provides a REST API on top of `Play2 <https://github.com/playframework/Play20/>`_.
|
2011-12-12 12:27:45 +01:00
|
|
|
|
2012-02-12 23:09:47 +01:00
|
|
|
Getting started
|
|
|
|
|
---------------
|
|
|
|
|
|
2012-07-03 11:28:24 +02:00
|
|
|
Easiest way to get started with `Play2 Mini <https://github.com/typesafehub/play2-mini>`_ is to use the
|
|
|
|
|
G8 project templates, as described in the `Play2 Mini Documentation <https://github.com/typesafehub/play2-mini>`_.
|
|
|
|
|
|
|
|
|
|
If you already have an Akka project and want to add Play2 Mini, you must first add the following to
|
|
|
|
|
your ``libraryDependencies``::
|
2012-02-12 23:09:47 +01:00
|
|
|
|
2012-03-06 13:20:00 +13:00
|
|
|
libraryDependencies += "com.typesafe" %% "play-mini" % "<version-number>"
|
2012-05-21 14:40:18 +02:00
|
|
|
|
2012-07-03 11:28:24 +02:00
|
|
|
In case you need to start Play2 Mini programatically you can use::
|
|
|
|
|
|
|
|
|
|
play.core.server.NettyServer.main(Array())
|
|
|
|
|
|
|
|
|
|
|
2012-05-21 14:40:18 +02:00
|
|
|
Akka Mist
|
|
|
|
|
=========
|
|
|
|
|
|
|
|
|
|
If you are using Akka Mist (Akka's old HTTP/REST module) with Akka 1.x and wish to upgrade to 2.x
|
|
|
|
|
there is now a port of Akka Mist to Akka 2.x. You can find it `here <https://github.com/thenewmotion/akka-http>`_.
|
|
|
|
|
|
|
|
|
|
Other Alternatives
|
|
|
|
|
==================
|
|
|
|
|
|
|
|
|
|
There are a bunch of other alternatives for using Akka with HTTP/REST. You can find some of them
|
|
|
|
|
among the `Community Projects <http://akka.io/community>`_.
|