August 2016
Intermediate to advanced
376 pages
6h 33m
English
At this point, we will create the env.js file; this file verifies the configurations of the Cloudinary service. Create a file called env.js inside the config folder and place the following code:
// get Env variable / cloudinary
module.exports = function(app, configEnv) {
var dotenv = require('dotenv');
dotenv.load();
var cloudinary = require('cloudinary').v2;
// Log some messages on Terminal
if ( typeof(process.env.CLOUDINARY_URL) == 'undefined' ){
console.log('Cloudinary config file is not defined');
console.log('Setup CLOUDINARY_URL or use dotenv mdule file')
} else {
console.log('Cloudinary config, successfully used:');
console.log(cloudinary.config())
}
}
Now we have a fully configured application; however, we still ...
Read now
Unlock full access