0.1.0-alpha • Published 9 years ago

caffe v0.1.0-alpha

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

Caffe

Caffe is an opinionated abstraction layer for building distributed application components. That's a lot of tech-jargon for "build functions that can be called over one or more networks."

The library itself is very barebones and acts as an interface for plugins to communicate with your code.

Getting Started

Install via NPM

npm install --save caffe

Add it to your project

var caffe = require('caffe')

Services

All of your application's operations exist within a service. You can have multiple services within a single Node app or split them up across multiple apps depending on your business needs.

Create a new service

You can create a new service using the brew() method. Note: service() is available as an alias for brew().

var fooService = caffe.brew('foo')

Begin accepting requests

Once you've created and configured a new service, you can tell it to start handling requests using the serve() method. Note: listen() is available as an alias for serve().

fooService.serve()

Client

Sometimes you need to