This command line interface provides a belt full of tools that make building microservices using micro a breeze! It's only meant to be used in development, not in production (that's where micro comes in).
stdout
Error
object if any exceptions are thrownImportant: This tool is only meant to be used in development. In production, you should use micro, which is much lighter and faster (and also comes without the belt of tools used when developing microservices).
When preparing your development environment, firstly install micro-dev
:
npm install --save-dev micro-dev
Note: You'll need at least Node.js v7.6.0 to run micro-dev
.
Next, add a new script
property below micro
inside package.json
:
"scripts": {
"start": "micro",
"dev": "micro-dev"
}
As the final step, start the development server like this:
npm run dev
The package can be used in conjunction with the Node.js inspector like this:
"scripts": {
"inspect": "node --inspect node_modules/.bin/micro-dev"
}
As the final step, start the development server like this:
npm run inspect
cd micro-dev
npm link
Inside the project where you want to test your clone of the package, you can now either use npm link micro-dev
to link the cloned source to your project's local dependencies or run micro-dev
right in your terminal.