Skip to content

Commit 7baaf53

Browse files
committed
First test of akka-http
1 parent 9dcca4b commit 7baaf53

File tree

5 files changed

+33
-1
lines changed

5 files changed

+33
-1
lines changed

activator.properties

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
name=akka-http-rest-example
2+
title=Akka Http Rest - Simple example
3+
description=Simple example of akka-http server with rest api
4+
tags=akka,http,akka-http,microservice,scala,rest
5+
authorTwitter=kishore_reddy

build.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name := "Instagram-pics-filter"
22

3+
organization := "com.kishore.reddy"
34

45
version := "0.0.1"
56

src/main/resources/public/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
<title></title>
66
</head>
77
<body>
8+
Hello World!
89
</body>
9-
</html>
10+
</html>

src/main/scala/com/slate/http/examples/ModelPathBuilder.scala

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ object ModelPathBuilder extends PathDirectives with RouteDirectives with RouteCo
2323
* @note : this builder must implement RouteConcatenation to use the "~"
2424
*/
2525
def buildPathsForModel(model:String):Route = {
26+
var paths = path ( model / "create" ) { complete ( model + " - create") }
27+
paths = paths.~( path ( model / "retrieve") { complete ( model + " - retrieve") } )
28+
paths = paths.~( path ( model / "update" ) { complete ( model + " - update") } )
29+
paths = paths.~( path ( model / "delete" ) { complete ( model + " - delete") } )
2630
paths
2731
}
2832
}

tutorial/index.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<html>
2+
<head>
3+
<title>Akka HTTP REST Example - Instagram Pictures Filter - Activator Template</title>
4+
</head>
5+
<body>
6+
<div>
7+
<h2>Get Started</h2>
8+
<p>
9+
Main goal of this project to show an example on how to use Akka HTTP as REST service.<br/>
10+
This project will hep you to load your pictures by date range from your Instagram.
11+
</p>
12+
<p>
13+
For more information please read README at authors Github:
14+
<a href="https://github.com/pvoznenko/akka-http-rest-example">https://github.com/pvoznenko/akka-http-rest-example</a>
15+
</p>
16+
<p>
17+
About Akka HTTP, you can read at
18+
<a href="http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC4/index.html" target="_blank">http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-RC4/index.html</a>
19+
</p>
20+
</div>
21+
</body>
22+
</html>

0 commit comments

Comments
 (0)