0.0.2 • Published 8 years ago

n-rules v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Node-Rules

Beginnings of a rule engine for NodeJS

- Your rules should be a first class citizen of your API
- This is being built with some ideas taken from GraphQL

Examples

import nRules from 'n-rules';

const types = `
  @Secure(LoggedIn)
  userTask checkItOut(create: Chicken) {

  }

  serverTask updateSomeStuff: Banana {

  }
`;

const resolvers = {
  checkItOut: () => "winning"
}

/*
  Just declare your task and resolvers.
  userTasks will be turned into RESTful endpoints
*/
nRules(types, resolvers);