用Mongoose和Node.js和Underscore生成代码的简单方法? [英] Straightforward way to generate code with Mongoose and Node.js and Underscore?

查看:87
本文介绍了用Mongoose和Node.js和Underscore生成代码的简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想生成这样的东西:

http://www.ivarvong. com/2010/08/node-js-connect-mongoose-and-underscore/

但是我想生成html模板和其他客户端代码,并具有通用/整体保存/查询/读取,或者为Node.js代码和客户端(jQuery或其他)生成个性化的代码基于模型的.

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.

因此,类似于使用Underscore填充基于某些Monogoose(MongoDB)模型的一些模板.根据该模型,您可以得到一个可以填写的HTML表单,一些客户端和服务器端代码可以将该模型中的数据保存到MongoDB中,还有一些代码可以在列表或表中显示该模型的数据.

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.

推荐答案

所以这是一个较晚的答复,但是我相信这是您正在寻找的项目:

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

Railway.js

这有点像Rails&节点/快速/猫鼬.如果您正在寻找Node.JS的Rails,这似乎是最接近的事情.

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.

这篇关于用Mongoose和Node.js和Underscore生成代码的简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆