I've never seen this before but I have an Express app running and on the localhost port Axios returns the request no problem but on the localhost domain it returns "bound consoleCall". Does anyone have any experience with this and know what it means?
<meta property="og:title" content="bound consoleCall" />
helpers.js
const axios = require('axios');
const {
titleSuffix,
organizationPath,
varietyPath
} = require('./constants');
let organizationData = {};
let varietyData = {};
const Helpers = {
fetchOrganization: (organizationID) => {
return axios
.get(organizationPath + organizationID)
.then(response => {
const organizationData = response.data.data;
return organizationData
})
.catch(err => console.error);
},
setOrgSocialMeta: (growerHash, res) => {
return Helpers.fetchOrganization(growerHash)
.then(org => {
return org.name + titleSuffix;
});
}
};
module.exports = Helpers;
server.js
const {
setOrgSocialMeta,
setVarSocialMeta
} = require('./helpers');
app.get(['/org/:growerHash/*', '/_org/:growerHash/*'], (req, res) => {
setOrgSocialMeta(req.params.growerHash, res)
.then(orgTitle => {
res.locals.meta.title = orgTitle;
res.locals.meta.og.title = orgTitle;
res.render('org');
});
});