All Projects → vitorsvieira → akka-http-circe-json-template

vitorsvieira / akka-http-circe-json-template

Licence: Apache-2.0 license
Akka HTTP REST API Project Template using Akka HTTP 10.0.4 with Circe 0.7.0 targeting Scala 2.12.x

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to akka-http-circe-json-template

Otoroshi
Lightweight api management on top of a modern http reverse proxy
Stars: ✭ 177 (+742.86%)
Mutual labels:  akka, akka-http, akka-streams
Quark
Quark is a streaming-first Api Gateway using Akka
Stars: ✭ 13 (-38.1%)
Mutual labels:  akka, akka-http, akka-streams
ecommerce
A project for exploring Akka with Scala
Stars: ✭ 24 (+14.29%)
Mutual labels:  akka, akka-http, circe
typebus
Framework for building distributed microserviceies in scala with akka-streams and kafka
Stars: ✭ 14 (-33.33%)
Mutual labels:  akka, akka-http, akka-streams
slicebox
Microservice for safe sharing and easy access to medical images
Stars: ✭ 18 (-14.29%)
Mutual labels:  akka, akka-http, akka-streams
khermes
A distributed fake data generator based in Akka.
Stars: ✭ 94 (+347.62%)
Mutual labels:  akka, akka-http, akka-streams
telepooz
Functional Telegram Bot API wrapper for Scala on top of akka, circe, cats, and shapeless
Stars: ✭ 26 (+23.81%)
Mutual labels:  akka, circe, akka-streams
Es Cqrs Shopping Cart
A resilient and scalable shopping cart system designed using Event Sourcing (ES) and Command Query Responsibility Segregation (CQRS)
Stars: ✭ 19 (-9.52%)
Mutual labels:  akka, akka-http, akka-streams
akka-cookbook
提供清晰、实用的Akka应用指导
Stars: ✭ 30 (+42.86%)
Mutual labels:  akka, akka-http, akka-streams
Scale
Another example of a REST API with Akka HTTP
Stars: ✭ 23 (+9.52%)
Mutual labels:  akka, akka-http, akka-streams
Squbs
Akka Streams & Akka HTTP for Large-Scale Production Deployments
Stars: ✭ 1,365 (+6400%)
Mutual labels:  akka, akka-http, akka-streams
Akka Management
Akka Management is a suite of tools for operating Akka Clusters.
Stars: ✭ 218 (+938.1%)
Mutual labels:  akka, akka-http
Akka Stream Contrib
Add-ons to Akka Stream
Stars: ✭ 173 (+723.81%)
Mutual labels:  akka, akka-streams
Safe Chat
IRC-style chat demo featuring full-stack F#, Akka.Streams, Akkling, Fable, Elmish, Websockets and .NET Core
Stars: ✭ 157 (+647.62%)
Mutual labels:  akka, akka-streams
akka-http-quickstart-java.g8
akka.io
Stars: ✭ 17 (-19.05%)
Mutual labels:  akka, akka-http
akka-react-cloudant
A Soccer Dashboard created by scraping EPL website using Akka backend and ReactJS frontend and IBM Cloudant for object storage. IBM Cloud Foundry is used to host both frontend and backend app.
Stars: ✭ 21 (+0%)
Mutual labels:  akka, akka-http
kanadi
Kanadi is a Nakadi client for Scala
Stars: ✭ 20 (-4.76%)
Mutual labels:  circe, akka-streams
Parquet4s
Read and write Parquet in Scala. Use Scala classes as schema. No need to start a cluster.
Stars: ✭ 125 (+495.24%)
Mutual labels:  akka, akka-streams
fdp-modelserver
An umbrella project for multiple implementations of model serving
Stars: ✭ 47 (+123.81%)
Mutual labels:  akka-http, akka-streams
akka-cqrs-activator
Issue tracker PoC application written in Scala (Akka) and JavaScript (React) that demonstrates event sourcing and CQRS
Stars: ✭ 33 (+57.14%)
Mutual labels:  akka, akka-http

akka-http-circe-json-template

Build Status License

REST API Project Template using Akka HTTP 10.0.4 with Circe 0.7.0 targeting Scala 2.12.x.

This project template proudly uses:

Usage

Start services with sbt:

$ sbt
> run

You can send requests to the following paths:

$ curl http://localhost:8000/api/v1/service1/status
$ curl http://localhost:8000/api/v1/service1/models/<int>
$ curl http://localhost:8000/api/v1/service1/modelsByName/<string>
$ curl -X POST -H 'Content-Type: application/json' http://localhost:8000/api/v2/service1/model -d 
    '{
        "vString": "akka-http-circe",
        "vInt":42, 
        "vLong":100000000,
        "vFloat":2.4,
        "vDouble":4.2,
        "vSeqInt":[1,2,3],
        "vListInt":[4,5,6]
     }'

The routes with logging enabled are under the /v2/ path as below:

$ curl http://localhost:8000/api/v2/service1/status
$ curl http://localhost:8000/api/v2/service1/models/<int>
$ curl http://localhost:8000/api/v2/service1/modelsByName/<string>
$ curl -X POST -H 'Content-Type: application/json' http://localhost:8000/api/v2/service1/model -d 
    '{
        "vString": "akka-http-circe",
        "vInt":42, 
        "vLong":100000000,
        "vFloat":2.4,
        "vDouble":4.2,
        "vSeqInt":[1,2,3],
        "vListInt":[4,5,6]
     }'

You will be able to see in the console the requests reaching the /v2/ as below:

Thread:[akka-http-circe-json-akka.actor.default-dispatcher-16] DEBUG akka.actor.ActorSystemImpl - log-service: Response for
Request : HttpRequest(HttpMethod(POST),http://localhost:8000/api/v2/service1/model,List(Host: localhost:8000, User-Agent: curl/7.51.0, Accept: */*, Timeout-Access: <function1>),
HttpEntity.Strict(application/json,{"vString": "akka-http-circe", "vInt":42, "vLong":100000000, "vFloat":2.4,"vDouble":4.2,"vSeqInt":[1,2,3],"vListInt":[4,5,6]}),HttpProtocol(HTTP/1.1))
Response: Complete(HttpResponse(200 OK,List(),HttpEntity.Strict(application/json,{"message":"model.vString: akka-http-circe - model.vListInt: List(4, 5, 6)"}),HttpProtocol(HTTP/1.1)))

License

This code is open source software licensed under the Apache 2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].