Platformatic v0.20.0 - The NodeCongress Release

Platformatic v0.20.0 - The NodeCongress Release

Hey Folks, at the time I'm writing this, I'm in Berlin at NodeCongress and preparing to demo how to build a modular monolith with Fastify. I've also just released Platformatic v0.20.0 with two main changes!

The full changelog is available at github.com/platformatic/platformatic/releas...

Autoload Configuration for Platformatic Service and DB

We have added support for two new options that are already supported in @fastify/autoload: encapsulate and maxDepth.

This will allow you to create application structure like:

├── modules
│   ├── catalogue
│   │   ├── index.js
│   │   └── routes
│   │       └── products.js
│   └── inventory
│       ├── index.js
│       └── routes
│           └── product.js
├── platformatic.service.json
└── plugins
    ├── error.js
    └── not-found.js

6 directories, 8 files

This structure allows you to structure your Platformatic application in a monorepo, or even just multiple folders, enabling the structure of a modular monolith.

This was added in #867.

POST or PUT? Choose one

@ivan-tymoshenko recently found out in #859 that we were creating two identical routes for modifying an entity: POST /entity:id andPUT /entity:id. Unfortunately, this created a problem in the OpenAPI definition. As a solution, we have dropped POST /entity/:id in favor of PUT /entity/:id (#865).