Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Aug 2, 2016
1 parent dc1d99e commit bf267fb
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/main/scala/examples/clients/ContractProxyExample.scala
Expand Up @@ -12,6 +12,18 @@ import io.fintrospect.{Contract, ContractEndpoint, ContractProxyModule, RouteSpe

import scala.language.reflectiveCalls

/**
* This example shows how to use a contract to provide a Swagger-documented Proxy API for a set of remote routes.
*/
object ContractProxyExample extends App {

val proxyModule = ContractProxyModule("brewdog", BrewdogApiHttp(), BrewdogApiContract)

Http.serve(":9000", new HttpFilter(Cors.UnsafePermissivePolicy).andThen(proxyModule.toService))

Thread.currentThread().join()
}

object BrewdogApiHttp {
private val apiAuthority = Host("punkapi.com").toAuthority(Port(443))

Expand Down Expand Up @@ -41,15 +53,3 @@ object BrewdogApiContract extends Contract {
}

}

/**
* This example shows how to use a contract to provide a Swagger-documented Proxy API for a set of remote routes.
*/
object ContractProxyExample extends App {

val proxyModule = ContractProxyModule("brewdog", BrewdogApiHttp(), BrewdogApiContract)

Http.serve(":9000", new HttpFilter(Cors.UnsafePermissivePolicy).andThen(proxyModule.toService))

Thread.currentThread().join()
}

0 comments on commit bf267fb

Please sign in to comment.