Build scalable REST APIs using the open source tools and standards you already know.
Build scalable REST APIs using the open source tools and standards you and your team already know — Mongoose, Express, and Node.js streams. Baucis takes the boilerplate out of building and maintaining scalable HATEOAS/Level 3 REST APIs.
Baucis has tens of thousands of users and is used in production by startups, departments, and Fortune 500 companies, and at hackathons and conferences worldwide. MongoDB, Inc. awarded baucis first place in their 2014 Open Source Hack Contest.
Baucis is easy for beginners, easy to scale, yet flexible enough in the long term to be extended to solve complex use cases.
npm install --save baucis
An example of creating a REST API from a couple Mongoose schemata.
// Create a mongoose schema.var Vegetable = name: String ;// Register new models with mongoose.mongoosemodel'vegetable' Vegetable;// Create a simple controller. By default these HTTP methods// are activated: HEAD, GET, POST, PUT, DELETEbaucisrest'vegetable';// Create the app and listen for API requestsvar app = express;appuse'/api' baucis;applisten8012;
That's it! Now you have an RFC-compliant, flexible, and semantically rich API dealing with vegetables. You could access it with URLs like
http://localhost:8012/api/vegetables. CRUD is supported using GET, PUT, POST, and DELETE.
© 2012-2015 Kun.io App Studio LLC