现在使用sailsjs v0.10.配置connections.js和models.js并将其更改为connection:'localMongodbServer',安装npm install sails-mongo.
所有这一切都显示错误
 var des = Object.keys(dbs[collectionName].schema).length === 0 ?
                                          ^
TypeError: Cannot read property 'schema' of undefined
at Object.module.exports.adapter.describe (app1_test/node_modules/sails-mongo/lib/adapter.js:70:48)
Run Code Online (Sandbox Code Playgroud)
如果将collections.js更改为adapter.js显示错误
  [err] In model (model1), invalid connection :: someMongodbServer
  [err] Must contain an `adapter` key referencing the adapter to use.
Run Code Online (Sandbox Code Playgroud) 我的Controller登录页面有以下内容:   
// Authentication Controller
// the basics of Passport.js to work.
var AuthController = {
    // localhost:1337/login  Render the login page
    // <form role="form" action="/auth/local" method="post">
    //     <input type="text" name="identifier" placeholder="Username or Email">
    //     <input type="password" name="password" placeholder="Password">
    //     <button type="submit">Sign in</button>
    // </form>
    login: function(req, res) {
        var strategies = sails.config.passport,
            providers = {};
        // Get a list of available providers for use in templates.
        Object.keys(strategies).forEach(function(key) {
            if (key === 'local') return;
            providers[key] = {
                name: strategies[key].name, …Run Code Online (Sandbox Code Playgroud)