realworld-backend-micronaut
realworld-backend-micronaut copied to clipboard
Real world backend API built in Micronaut
Micronaut Framework codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API
This codebase was created to demonstrate a fully fledged fullstack application built with Micronaut including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Micronaut community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
Actual application is accessible on Heroku: https://realworld-backend-micronaut.herokuapp.com/api
How it works
This application basically uses Micronaut Framework with Java 8 with some other modules:
- Micronaut Data with Hibernate
- Json Web Token jjwt
- H2 in memory database
Some other highlights:
- Liquibase for the database changes management
- Micronaut declarative http clients for integration tests
- Github Actions as CI
- Execution of Realworld Postman collection is part of CI
- Deployment on Heroku is part of CI
- OpenAPI support with swagger-ui
- Micronaut built-in health, info, and prometheus metrics endpoints
- GraalVM support
Getting started
Java 8 or above is required
./gradlew run
To test that it works, open a browser tab at http://localhost:8080/api/tags .
Alternatively, you can run
curl http://localhost:8080/api/tags
Try it out with a RealWorld frontend
The entry point address of the backend API is at http://localhost:8080/api
Run test
The repository contains a lot of test cases to cover both api test and repository test.
./gradlew test