Lagom Samples
Lagom is an open source framework for building reactive microservice systems in Java or Scala.
This repository contains code examples to help you understand how to achieve common goals. In general, code in each folder of this repository tries to answer a question of type "How do I xyz ?". For example: "How do I use RDBMS read-sides with Cassandra write-sides?".
Samples index
-
Shopping Cart: a reference application demoing core Lagom features. It is available in Java and Scala.
-
How do I use RDBMS read-sides with Cassandra write-sides? (mixed persistence in java or mixed persistence in scala)
-
How do I integrate Lightbend Telemetry (Cinnamon)? (Java/Maven example)
-
How do I configure Log correlation (Cinnamon)? (Java/Maven example)
-
How do I use Lagom with Couchbase both write-side and read-side? Java Maven and Scala Sbt) (Couchbase Persistence is NOT production ready yet)
Community-driven examples
- How do I authenticate/authorize by JWT? (Java/Maven example, Scala/Sbt example)
- How do I generate OpenAPI/Swagger Specification for Lagom service? (Java/Maven example, Scala/Sbt example)
- How do I using Play's JPA API to do CRUD-oriented persistence in a Lagom service? (Java/SBT example)
- How do I use MongoDB as read-side in a Lagom service? (Scala/SBT example)
- How do I use a Lagom service in JavaScript? (Scala/SBT example)
Contributing examples
This project follows the Lagom contributor guidelines. Please read and follow those when contributing Lagom Samples.
Pre-requisites
To download and run these examples you will need:
- a git client
- sbt or Maven depending on the example.
- a Java Development Kit
- a code editor (such as IntelliJ, Eclipse, Atom,... )
Using these examples
If you want to run a specific example you will have to clone the whole repository and then navigate to a specific application folder. For example:
git clone https://github.com/lagom/lagom-samples.git
cd mixed-persistence/mixed-persistence-java-sbt
Each example includes specific instructions in it's README.md
file on how to run and exercise the application.
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. License
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you shall be licensed as above, without any additional terms or conditions.