flowee

1.0.32 • Public • Published

Flowee

a lightweight way to create JSONAPI-compatible api's for nodejs

Build Status

Getting started

$ npm install flowee
$ cp node_modules/flowee/test/model.js .

Create server.js:

var flowee = require('flowee')

var app = flowee.init({ model: require('./model.js'), store: true, router:true });
flowee.start( function(server) {
  return server.listen(1337);
});

( See model.js here )

$ node server.js

Voila! Now you have a server running with automatically mapped database entities (incl. many to many relations OHMY).

Ps. you can use it as express middleware too:

flowee.init({ model: require('./model.js'), store: true });
flowee.store.connect().then( console.dir )
flowee.export_swagger( flowee.model )
app.use( flowee.process )
// add routes
for (resource in flowee.model.paths) {
  methods = flowee.model.paths[resource];
  for (method in methods) {
    obj = methods[method];
    app[method](resource, obj.func);
  }
}

Architecture

Flowee promotes configuration over convention, click here to see the fullscreen architecture

Howtos

Features

Built on the shoulders of fortunejs, which represents:

Oh..and:

  • DDA: design-driven api by using a json SWAGGER v2 compatible model
  • middleware compatible: connect express and restify middleware modules from npm

Extensions

flowee-doc: automatic generating api documentation


flowee-auth: passport authentication


flowee-admin: automatic admin interface (TODO)

Philosophy

Take a look at loopback, meteor, cleverstack. Now imagine lightweight. Flowee likes to focus on:

  • lightweight and fast to install
  • json driven, declarative (monkeypatchable configuration over convention)
  • http framework agnostic
  • configuration over convention
  • allow re-usage of middleware from http frameworks like express/restify etc
  • extend using npm installs: no cli tools, no learningcurve

Readme

Keywords

none

Package Sidebar

Install

npm i flowee

Weekly Downloads

1

Version

1.0.32

License

ISC

Last publish

Collaborators

  • coderofsalvation