9 | var apiKey = process.env.APIKEY; // Imported from Azure
10 | apiKey = "********-****-****-****-************"; // DON'T COMMIT THIS
11 | var soapUrl = 'https://lite.realtime.nationalrail.co.uk/OpenLDBWS/wsdl.aspx?ver=2014-02-20';
Whenever you make a commit, make sure you don't commit that line! Also, if you know of a better way to set the key during development, please let me know!
You now put your nominal config into ./config/config.example.js:
module.exports = {
apiKey: process.env.APIKEY
};
This will be versioned, and can be checked into git.
Departures from this nominal config are extended on from ./config/config.js.
This is a .gitignore’d file that will be created (if not existent already) at build-time.
Regarding:
You now put your nominal config into
./config/config.example.js
:This will be versioned, and can be checked into git.
Departures from this nominal config are extended on from
./config/config.js
. This is a .gitignore’d file that will be created (if not existent already) at build-time.