Kotlin project to showcase mutiple ways to build a microservice, using libraries like jooby, sparkjava, rapidoid, etc
The project consists of a really contrived example of a blog platform.
The platform supports users, posts and comments
- User
- A user has a username
- Can create many posts
- Can create many comments
- Post
- Has content represented by a String
- It can only be created by an existing user
- Comment
- Has text represented by a String
- Can only be added by an existing user to an existing post.
This module only contains the classes representing the domain and the logic needed to achieve it.
This module defines the implementation of the interfaces defined in the domain module.
It uses Postgres as the datastore and uses requery as the database access layer
This modules provides the REST api using Jooby.
First you need postgres installed and running on the default port.
It should have a user "postgres" with password "postgres" and a database called "blog"
Run the migration and it should create the schema and populate the tables.
./gradlew flywayMigrate
./gradlew jooby-api:run
./gradlew test