Giter Site home page Giter Site logo

micro-dev's Introduction

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).

CircleCI Join the community on Spectrum

Features

  • Hot Reloading: When making changes to your code, the server will restart by itself
  • Logs: Incoming and outgoing requests will be logged to stdout
  • Beautiful JSON: When JSON bodies are logged, they're styled and prettified
  • Clipboard Support: The local address is pasted to the clipboard automatically
  • Port Selection: Automatic detection and use of an open port (if the specified one is in use)
  • Debug in Your Network: The network address shown in addition to local one
  • Duration Logs: Calculates and shows the duration for each request
  • Pretty Errors: Prettifies the Error object if any exceptions are thrown

Usage

Important: 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

Debugging

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:

yarn run inspect

Contributing

  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Move into the directory of the clone: cd micro-dev
  3. Link it to the global module directory of Node.js: 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.

Authors

micro-dev's People

Contributors

anatoo avatar azz avatar bakpakin avatar bartdeslagmulder avatar brikou avatar dotcypress avatar floatdrop avatar fmiras avatar kandros avatar leo avatar lukeed avatar paulogdm avatar possibilities avatar ramiel avatar randallsquared avatar rapzo avatar sbrichardson avatar sijad avatar timneutkens avatar tungv avatar zertz avatar zigomir avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.