micro 0,0,2,3,0,9,3,3 travis-ci npm

Async HTTP microservices made easy

2 years after MIT

Micro — Async ES6 HTTP microservices

Build Status Coverage Status Slack Channel XO code style

Features

  • Easy. Designed for usage with async and await (more)
  • Fast. Ultra-high performance (even JSON parsing is opt-in).
  • Micro. The whole project is ~100 lines of code.
  • Agile. Super easy deployment and containerization.
  • Simple. Oriented for single purpose modules (function).
  • Explicit. No middleware. Modules declare all dependencies.
  • Standard. Just HTTP!
  • Lightweight. The package is small and the async transpilation is fast and transparent

Usage

Firstly, install it:

npm install --save micro

Then add a start script to your package.json like this:

{
  "main": "index.js",
  "scripts": {
    "start": "micro"
  }
}

Then create an index.js file and populate it with function, that accepts standard http.IncomingMessage and http.ServerResponse objects:

module.exports = (req, res) => { res.end('Welcome to micro') }

Micro provides useful helpers but also handles return values – so you can write it even shorter!

module.exports = () => 'Welcome to micro'

Once all of that is done, just start the server:

npm start

And go to this URL: http://localhost:3000 -

Related Repositories

micro-server

micro-server

Microserver is a Java 8 native, zero configuration, standards based, battle hard ...

skinny-micro

skinny-micro

:microphone: Micro Web framework to build Servlet applications in Scala, the cor ...

symfony-micro

symfony-micro

Symfony micro applicatin ...

micro-dashboard

micro-dashboard

Dashboard for microservices toolchain micro. ...

Caliburn.Micro.Logging

Caliburn.Micro.Logging

Logging Extensions for Caliburn.Micro ...


Top Contributors

leo rauchg greenkeeperio-bot kevin-roark domachine allain amio leebyron onbjerg rase-

Dependencies

package version
media-typer 0.3.0
mri 1.1.0
raw-body 2.2.0
dev ava 0.21.0
coveralls 2.13.1
eslint-config-prettier 2.3.0
husky 0.14.3
lint-staged 4.0.2
nyc 11.1.0
prettier 1.5.3
request 2.81.0
request-promise 4.2.1
resumer 0.0.0
test-listen 1.0.2
then-sleep 1.0.1
xo 0.18.2

Releases

-   6.0.2 zip tar
-   6.0.1 zip tar
-   6.0.0 zip tar
-   5.0.1 zip tar
-   5.0.0 zip tar
-   4.1.1 zip tar
-   4.1.0 zip tar
-   4.0.0 zip tar
-   3.0.0 zip tar
-   2.1.0 zip tar
-   2.0.0 zip tar
-   1.0.4 zip tar
-   1.0.3 zip tar
-   1.0.2 zip tar
-   1.0.1 zip tar
-   1.0.0 zip tar