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
def reverseProxy = Action.async(parse.raw) { | |
request: Request[RawBuffer] => | |
// Create the request to the upstream server: | |
val proxyRequest = | |
WS.url("http://localhost:8887" + request.path) | |
.withFollowRedirects(false) | |
.withMethod(request.method) | |
.withVirtualHost("localhost:9000") | |
.withHeaders(flattenMultiMap(request.headers.toMap): _*) | |
.withQueryString(request.queryString.mapValues(_.head).toSeq: _*) |
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
// you must add this line to the build.scala :: play.Project(.........).settings(....) | |
// .settings(aspectjSettings: _*).settings(inputs in Aspectj <+= compiledClasses,products in Compile <<= products in Aspectj, products in Runtime <<= products in Compile) | |
package filters; | |
import models.User; | |
import org.aspectj.lang.JoinPoint; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.aspectj.lang.annotation.Before; |
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
package com.minosiants | |
import akka.event.ActorEventBus | |
import akka.event.LookupClassification | |
import akka.actor.ActorSystem | |
import akka.actor.Props | |
import akka.actor.Actor | |
import java.util.Date | |
import java.util.UUID |
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
var express = require('express'); | |
var redis = require('redis'); | |
const serverType = process.argv[2]; | |
const serverHost = process.argv[3]; | |
const serverPort = parseInt(process.argv[4]); | |
const redisPort = 6379; | |
const redisHost = '127.0.0.1'; |