I want to generate something like this:
http://www.ivarvong.com/2010/08/node-js-connect-mongoose-and-underscore/
But I want to generate the html template and other client-side code, and either have generic/monolithic save/query/reads or generate individualized ones for the Node.js code and the client side (jQuery or whatever), all of that based on the model.
So something like using Underscore to fill in a few templates based on some Monogoose (MongoDB) models. Based on the model you get an HTML form someone can fill in, some client and server-side code to save data in that model to MongoDB, and some code to display the data for that model in a list or table.
I've written a library for this. Resource-Juggling takes your JugglingDB models (which may be persisted with Mongoose, Redis, MySQL, or other DBs) and exposes them as RESTful resources. By default we provide JSON access to all of them, but HTML is also possible by just writing the necessary templates.
See https://github.com/bergie/resource-juggling#readme
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With