danielasfregola / quiz-management-service Goto Github PK
View Code? Open in Web Editor NEWA collection of tutorials on how to build REST services using Spray, ReactiveMongo, AkkaHttp, etc
License: Apache License 2.0
A collection of tutorials on how to build REST services using Spray, ReactiveMongo, AkkaHttp, etc
License: Apache License 2.0
curl -v -H "Content-Type: application/json"
-X PUT http://localhost:5000/questions/test
-d { "answer": "YES!" }
should be
curl -v -H "Content-Type: application/json"
-X PUT http://localhost:5000/questions/test
-d '{ "answer": "YES!" }'
Running the spray-akka project, gives me:
WARN]... [run-main-4] [EventStream(akka://quiz-management-service)] Logger log1-Slf4jLogger did not respond within Timeout(5000 milliseconds) to InitializeLogger(bus)
error while starting up loggers
akka.ConfigurationException: Logger specified in config can't be loaded [akka.event.slf4j.Slf4jLogger] due to [akka.event.Logging$LoggerInitializationException: Logger log1-Slf4jLogger did not respond with LoggerInitialized, sent instead [TIMEOUT]]
at akka.event.LoggingBus$$anonfun$4$$anonfun$apply$1.applyOrElse(Logging.scala:116)
at akka.event.LoggingBus$$anonfun$4$$anonfun$apply$1.applyOrElse(Logging.scala:115)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:215)
at scala.util.Try$.apply(Try.scala:191)
at scala.util.Failure.recover(Try.scala:215)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:115)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:110)
at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:728)
at scala.collection.Iterator$class.foreach(Iterator.scala:750)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:727)
at akka.event.LoggingBus$class.startDefaultLoggers(Logging.scala:110)
at akka.event.EventStream.startDefaultLoggers(EventStream.scala:26)
at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:622)
at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:619)
at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:616)
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:616)
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:633)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:109)
at com.danielasfregola.quiz.management.Main$.delayedEndpoint$com$danielasfregola$quiz$management$Main$1(Main.scala:17)
at com.danielasfregola.quiz.management.Main$delayedInit$body.apply(Main.scala:12)
The examples handle a lot of boiler plate, with proper licensing it can be a good starting point for some micro services.
Hi,
I tried to use this portion of code slightly modified for my project but it always gives me the error of could not find implicit value for parameter marshaller:
case question: Question =>
requestContext.complete(StatusCodes.OK, question)
killYourself
[error] C:\Projects\Bayer\DashboardReporting\app\services\RestInterface.scala
[error] customers.map(c => requestContext.complete(StatusCodes.OK, c))
[error] ^
[error] one error found
error Compilation failed
[error] Total time: 277 s, completed Aug 31, 2016 3:07:57 PM
could not find implicit value for parameter marshaller: spray.httpx.marshalling.ToResponseMarshaller[(spray.http.StatusCodes.Success, customer)]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.