I'm new to the Nodejs world, I wonder why I can not test the most basic document algorithm link
My code looks like this:
var Pokedex = require('pokedex-promise-v2');
var options = {
protocol: 'https',
hostName: 'localhost:443',
versionPath: '/api/v2/',
cacheLimit: 100 * 1000, // 100s
tiemout: 5 * 1000 // 5s
}
var P = new Pokedex(options);
P.getBerryByName('cheri')
.then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log('There was an ERROR: ', error);
});