This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.scalaquery.ql.extended.{ExtendedTable => Table} | |
case class Writer(id: Option[Long] = None, firstName: String, lastName: Option[String] = None) | |
object Writers extends Table[Writer]("Writer") { | |
def id = column[Long]("id", O PrimaryKey, O AutoInc) | |
def firstName = column[String]("firstName") | |
def lastName = column[Option[String]]("lastName") | |
def * = id.? ~ firstName ~ lastName <>(Writer.apply _, Writer.unapply _) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Gateway { | |
import cc.spray.Directives._ | |
import cc.spray.directives.Remaining | |
import cc.spray.client.HttpConduit | |
val conduit = new HttpConduit("localhost", 8080) // this will connect to the back-end | |
val route = | |
path("test-service" / Remaining) { | |
path => ctx => val headers = ctx.request.headers.filter(_.name != "Host") |