This repository has been archived by the owner on Aug 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from Spray to Akka-Http (#11)
* add -feature flag to scala compile to show feature warnings * Remove cors support. This is no longer needed since the management UI server communicates with the marketplace instead management UI website itself * migrate spray routing to akka routing * run standalone application instead of spray servlet; fix issue with authorization header -> use akka Authorization object instead of strings * reformat routes code * remove spray libraries; fix http request for getting key from producer * use pathmatcher Remaining instead of Segment to work with tokens/ids containing slashes * first product test runs * all product tests run * consumer test work again; remove some unused options; deleting a consumer is only possible with the correct token in the auth header * merchant tests up and running * offer tests work; disabled some tests because its currently not possible to properly test signature validation (cannot add offers in tests) * instructions for testing * remove unused dependencies
- Loading branch information
1 parent
e756b5f
commit 82b7559
Showing
22 changed files
with
649 additions
and
708 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
package de.hpi.epic.pricewars | ||
|
||
import akka.actor.{ActorSystem, Props} | ||
import de.hpi.epic.pricewars.services.{DatabaseStore, MarketplaceServiceActor} | ||
import spray.servlet.WebBoot | ||
|
||
class Server extends WebBoot { | ||
implicit val system = ActorSystem("marketplace") | ||
val serviceActor = system.actorOf(Props[MarketplaceServiceActor]) | ||
DatabaseStore.setup() | ||
import akka.actor.ActorSystem | ||
import akka.http.scaladsl.Http | ||
import akka.stream.ActorMaterializer | ||
import de.hpi.epic.pricewars.services.{DatabaseStore, MarketplaceService} | ||
|
||
object Server { | ||
def main(args: Array[String]) { | ||
|
||
implicit val system: ActorSystem = ActorSystem("marketplace") | ||
implicit val materializer: ActorMaterializer = ActorMaterializer() | ||
|
||
DatabaseStore.setup() | ||
Http().bindAndHandle(MarketplaceService.route, "0.0.0.0", port = 8080) | ||
} | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.