The Mia-Platform Node.js service launcher
lc39 is a Command line utility that will launch a Fastify instance configured for serving a Node.js service on Mia-Platform.
To install the package you can run:
npm install @mia-platform/lc39 --saveThe following table shows the supported versions of Fastify for each version of lc39:
| lc39 version | Fastify version |
|---|---|
| v9 | 5.x.x |
| v8 | 4.x.x |
| v6 | 3.x.x |
You can check the CHANGELOG for more details about the changes in each version.
We recommend to install the module locally on every one of your project to be able to
update them indipendently one from the other. To use the locally installed instance you
have to add the following script to your package.json:
"scripts": {
"start": "lc39 index.js"
},To see all the options you can add to the cli run:
npx lc39 --help
Now you are ready to code your mia-platform service!
To work properly with lc39 your service main file should follow some rules: