I am very new to Scala and tried writing an Spray API example using SBT for practice but getting below issue.

import spray.routing.SimpleRoutingApp
import akka.actor.ActorSystem
object ScalaBay extends App with SimpleRoutingApp {
implicit val actorSystem = ActorSystem()
startServer(interface = "localhost", port = 8080) {
get { path("hello") {
complete { "welcome" }
}
}
}
}
- I have created a routing API using spray and Akka.
- once server starts with localhost address, once it gets path="hello" it should complete with some success message.
- But getting the error "Type mismatch, expected: (HNil) => routing.Route, actual: StandardRoute" while routing to after giving the path.
Please help me with how to resolve the issue.