Handling Node.js Async Returns with “require” (Node ORM)
问题 I'm using the Node.js ORM module : https://github.com/dresende/node-orm I'm able to create a model by doing this: var orm = require("orm"); var db = orm.connect("creds", function (success, db) { if (!success) { console.log("Could not connect to database!"); return; } var Person = db.define("person", { "name" : { "type": "string" }, "surname": { "type": "string", "default": "" }, "age" : { "type": "int" } }); }); The problem is that I want to put Person (and all other models for that matter)