Connor Smyth

graphical user interface
graphical user interface

Sails.js Hook Dotenv

Sails JS hook to load environment variables from a .env file using 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

See The Project Here

Installation

npm install sails-js-hook-dotenv

Usage

Start sails as you normally do (sails lift) and you will be able to access your environment variables using process.env.your-variable-name

Configuration

You can add configuration options for this hook in config/dotenv.js by default.

Testing

Copy the .env.example file to create a new .env file.

Then run npm run test in your terminal.

Changelog

Changelog