sails-permissions icon indicating copy to clipboard operation
sails-permissions copied to clipboard

README: Setting Env variable's example does not work

Open sahilshekhawat opened this issue 9 years ago • 3 comments

The example given here https://github.com/tjwebb/sails-permissions#3-set-environment-variables to add env variables to sails does not work.

This should be:

module.exports.permissions = {
  adminUsername: 'admin',
  adminEmail: '[email protected]',
  adminPassword: 'admin1234'
}

Should I raise a PR?

sahilshekhawat avatar Feb 13 '16 06:02 sahilshekhawat

I want this in config/local.js, but it doesn't seem to work there. The default admin user is created instead.

How can I put this in config/local.js and make Sails actually use it?

RothAndrew avatar Feb 15 '16 02:02 RothAndrew

If I understand you correctly, you can put the sample code that I have given above in config/local.js and it will work.

sahilshekhawat avatar Feb 15 '16 06:02 sahilshekhawat

In the config/local.js you can add this:

  permissions: {
    adminUsername: 'admin',
    adminEmail: '[email protected]',
    adminPassword: '12345678' //should be longer than 8 chars
  }

this worked for me.

idoivri avatar Aug 01 '16 15:08 idoivri