sails.jssails-postgresql

Sails database configuration issue with postgresql


I upgrade sails to 1.0, I resolved all the other errors but not able to resolved database connection issue,

It will be really helpful if anyone can reply on this.

module.exports.datastores = {
  localDiskDb: {
    adapter: 'sails-disk'
  },
  postgreSql: {
    adapter: 'sails-postgresql',
    // url: 'postgresql://admin:root@localhost:5432/testdb',
    // ssl: true,
    host: 'localhost',
    user: 'admin',
    password: 'root',
    database: 'testdb'
  },
};

Important Error Logs

enter image description here


Solution

  • I was using password which contains % after changing the password sails successfully connected to postgresql.

    It mostly looks like bug with Sails v1 or Sails-pgsql adapter.