Fork me on GitHub
Restberry works with both Express and Restify!

Restberry 1.1 RESTful API Framework

Framework for setting up RESTful APIs with NodeJS. Define your models then setup your CRUD API without needing to write any code.

How to build a backend service with Restberry
var restberry = require('restberry');

restberry
    .config({
        apiPath: '/api/v1',
        db: 'mongodb://localhost/weather-app',
        env: 'prod',
        name: 'WEATHER APP',
        port: 5000,
    })
    .listen();

restberry.model('City')
    .schema({
        name: {type: String, required: true},
        location: {
            longitude: {type: Number},
            latitude: {type: Number},
        },
    })
    .routes
        .addCreateRoute()  // POST /api/v1/cities
        .addReadRoute()  // GET /api/v1/cities/:id
        .addReadManyRoute()  // GET /api/v1/cities

var CONDITIONS = [
    'Cloudy',
    'Rainy',
    'Sunny',
];
restberry.model('Weather')
    .schema({
        city: {type: restberry.odm.ObjectId, ref: 'City', required: true},
        date: {type: Date, default: Date.now},
        tempature: {type: Number, required: true},
        condition: {type: String, enum: CONDITIONS, required: true},
    })
    .routes
        .addCreateRoute({  // POST /api/v1/cities/:id/weathers
            parentModel: restberry.model('City'),
        })
        .addReadRoute()  // GET /api/v1/weathers/:id
        .addReadManyRoute({  // GET /api/v1/cities/:id/weathers
            parentModel: restberry.model('City'),
        })

CONTACT Materik