I guess it depends on what you want:
- Rails style code generation (where it generates code for you that you can modify)
- Django style semi magic where admin forms can be derived from the fields in your table/document schema.
- you mean generating an API for these fields in the database, ala what grape does for Ruby — you do some configuration and translating data to JSON and transmitting it back over the wire is taken care of for you
- You have a new project and you’re looking for a framework with one of these three characteristics
For the first three options there are a few related SO questions on this already:
-
Node.js Mongoosejs Crud scaffolding
-
Admin panel for Node.js and Mongoose
-
Is there a CRUD generator for Mongoose and Node.js and Underscore? Or a CRUD generator for a similar stack?
There are a few awesome answers in this set of links, including:
- @jsalonen’s answer gathering up some tools <– mostly about generating admin UIs
- @Dow’s answer with some tools <– he mentions RailwayJS (now CompoundJS), then points to some other SO questions/answers on this topic.
- @bergie’s answer about a module that exposes JugglingORM models as RESTful API routes automatically
- Or, as @Andbdrew mentioned in the comments, there’s node-restify
- You could write your own generator – perhaps you could write a Cake task that would take a template file, execute some Javascript and output a view for your application. I started down this path recently myself. Certainly with the variety of technologies Node.js apps involve (different ORM choices, Javascript front ends, CSS layouts) this may make sense.
For the last option – an opinionated rapid web development Node.js framework that provides good API support, there are a few options:
- @abject_error’s answer, in this question, about Sails
- Geddy <– automatically provides .json versions of the data your controller specifies (depending on the request it uses this data to render HTML views or creates a JSON representation)
- There’s a nice slide-show on How to quickly make REST APIs with CompoundJS, so CompoundJs may fit your tastes.
I initially left these off as I assumed you may have an existing project, or didn’t want to use an opinionated framework, but added them because why not.