Straightforward way to generate code with Mongoose and Node.js and Underscore?

☆樱花仙子☆ 提交于 2019-11-28 21:08:01

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

Gates VP

So this is a late reply, but I believe that this is the project you're looking for:

Railway.js

It's kind of a cross between Rails & Node/Express/Mongoose. If you're looking for the Rails of Node.JS, this seems to be the closest thing.

Here is another crud gen i found:

https://github.com/jspears/bobamo

I havent personally used it yet, but when i do ill report back

Another package you can try is cruds.

It provides crud for node.js, express and mongodb and the REST is compatible with the default backbone.js url scheme.

See AllcountJS rapid application development framework. It allows to define domain model in JSON-like format. For example simple Hello World application that would have one MongoDB collection named HelloWorld with two fields: text "Foo" and date "Bar" would look like

A.app({
  appName: "Hello World",
  menuItems: [
    {
      name: "Hello world",
      entityTypeId: "HelloWorld",
    }
  ],
  entities: function(Fields) {
    return {
      HelloWorld: {
        fields: {
          foo: Fields.text("Foo"),
          bar: Fields.date("Bar")
        }
      }
    }
  }
});

Menu, table and form UI is generated automatically using default Jade templates, AngularJS and Twitter Bootstrap. AllcountJS also provides a way to override default templates and has other extension points.

I'm not 100% sure I follow but maybe something like Backbone.js would help. Backbone will provide an MVC framework making it very easy to create straightforward consistent components in each layer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!