如何从字符串创建mongoose模型

时间:2014-02-24 19:43:30

标签: javascript node.js express mongoose

如果我从远程存储库获取mongoose模型(我有该文件的字符串,文件包含有效的mongoose模式定义),如何在本地代码中使用? 我需要使用该模型来查询远程数据库。

 [{"fileName":"person.js","fileContent":"{\"name\":\"Jane\",\"last_name\":\"Lo\",\"schema\":{\"id\":{\"unique\":true}},\"options\":{}}"}]

0 个答案:

没有答案