-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b588430
commit a329853
Showing
6 changed files
with
32 additions
and
1 deletion.
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
17 changes: 17 additions & 0 deletions
17
http/src/main/scala/org/broadinstitute/dsde/workbench/leonardo/http/api/HelloRoutes.scala
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.broadinstitute.dsde.workbench.leonardo.http.api | ||
|
||
import akka.http.scaladsl.model.StatusCodes | ||
import akka.http.scaladsl.server | ||
import akka.http.scaladsl.server.Directives.{complete, get, pathEndOrSingleSlash, pathPrefix} | ||
import org.broadinstitute.dsde.workbench.leonardo.http.service.HelloService | ||
|
||
class HelloRoutes(helloService: HelloService) { | ||
val routes: server.Route = | ||
pathPrefix("hello") { | ||
pathEndOrSingleSlash { | ||
get { | ||
complete(StatusCodes.OK -> helloService.getResponse) | ||
} | ||
} | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...src/main/scala/org/broadinstitute/dsde/workbench/leonardo/http/service/HelloService.scala
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.broadinstitute.dsde.workbench.leonardo.http.service; | ||
|
||
import cats.effect.IO | ||
|
||
class HelloService { | ||
def getResponse: IO[String] = IO.pure("Hello, World!") | ||
} |