TwitterServer — TwitterServer 1.9.0 documentation
Quick-start ¶
twttr twttr http://maven.twttr.com/ com.twitter twitter-server_2.10 1.9.0 or, with sbt: NB: You only need to add the maven.twttr.com common maven.twttr.com , which adds Metrics , requires a twitter common library. First we’ll need to import a few things into our namespace. import com.twitter.finagle.{Http, Service} import com.twitter.io.Charsets import com.twitter.server.TwitterServer import com.twitter.util.{Await, Future} import org.jboss.netty.buffer.ChannelBuffers.copiedBuffer import org.jboss.netty.handler.codec.http._ TwitterServer defines its own version of the standard main com.twitter.server.TwitterServer method (no arguments). In this example, we use Finagle to start an HTTP server on port 8888. The service bound to this port is a simple hello service.
Read full article from TwitterServer — TwitterServer 1.9.0 documentation
No comments:
Post a Comment