starch

starch ======

  • Completely manages credits & stripe payments.
  • Built-in reward system for users:
    • give rewards for referrals (credits)
    • give rewards for early adopters

bootstrap.js

 
var plugin = require("plugin");
 
plugin().
params({
    starch: {
        plans: {
            "basic": {
                maxAccounts: 1
            },
            "pro": {
                maxAccounts: 4
            },
            "business": {
                maxAccounts: 4
            }
        }
    },
    http: {
        port: 80
    },
    mongodb: "mongodb://host/database"
}).
require("starch").
require(__dirname + "/starchModule.js").
load();

starchModule.js

exports.require = ["starch", "plugin-express"];
exports.plugin = function(starchhttpServer) {
    
 
    //listening for charges events from stripe 
    starch.events.on("charge.succeeded", function(data) {
 
    });
 
 
 
    httpServer.get("/premium/service", starch.middelware.paid("basic"), function(reqres) {
        //do stuff for basic plan 
    });
}