Form generation from Mongoose Schema object? Form generation from Mongoose Schema object? mongoose mongoose

Form generation from Mongoose Schema object?


My little project creates complete CRUD for a mongoose schema. Its a little rough butmight be useful.https://github.com/jspears/bobamo

It is very client side though, all the forms are generated (they can be overriden with static versions if it is not what you need). That is it doesn't use jade, but it does use underscore template on the client and jqtpl on the server to generate the javascript that makes the form.

Wow that was really unclear... The browser talks to the server via JSON/REST it loads this into an all javascript front end. This front end is generated on the node server on demand, to the client. So it easy to modify, and relatively cleanly sepeartes the data from the view.


I can recommend checking out Formage (npm: formage)

https://github.com/Empeeric/formage

You can get good ideas from this project.


If you're exporting out your models, ie

module.exports = mongoose.model("ModelName", Model)

Check in your module's .schema. That should have all the info you need.