Sails.js hook for loading .env files
npm install sails-hook-dotenvSails JS hook to load environment variables from a .env file using dotenv
npm install sails-hook-dotenv
Start sails as you normally do (sails lift) and you will be able to access your environment variables using process.env.your-variable-name
You can add configuration options for this hook in config/dotenv.js by default. Currently, the only option is a boolean: active. Setting this to false will disable this hook.