@@platformatic I mean to say if would want to start a new project with multiple services. Then which service should be used? Patformatic runtime or Platformatic service?
Please do more examples with testing, why decorators are better and how to test it properly. Also would like to see if plugin connects to db during initialisation, how do we handle this in tests?
Take a look at ruclips.net/video/g-6Ig8k6Nzc/видео.html, it explains why Decorators are better. There are a few testing strategies for plugins that requires db. We prefer to run the full app for the tests (at least for the critical paths), so we send payloads to the incoming routes. You could also spin up a Fastify instance with just that plugin, and wire all the dependencies yourself - this is very useful if you are doing mock testing.
Master in MasterClass! A Question btw. When I should Platformatic runtime?
How to start a app with what?
`platformatic start` will start your application on top of platformatic runtime.
@@platformatic I mean to say if would want to start a new project with multiple services.
Then which service should be used? Patformatic runtime or Platformatic service?
Great tutorial sir, thank you!
Please do more examples with testing, why decorators are better and how to test it properly. Also would like to see if plugin connects to db during initialisation, how do we handle this in tests?
Take a look at ruclips.net/video/g-6Ig8k6Nzc/видео.html, it explains why Decorators are better.
There are a few testing strategies for plugins that requires db. We prefer to run the full app for the tests (at least for the critical paths), so we send payloads to the incoming routes. You could also spin up a Fastify instance with just that plugin, and wire all the dependencies yourself - this is very useful if you are doing mock testing.