Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
!(server.config.gateways.mongoose && server.config.gateways.mongoose.uri)
) {
server.logger.warn(
"cannot start server without gateways.mongoose.uri provided in configuration"
);
} else {
// @ts-ignore
mongoose.connect(server.config.gateways.mongoose.uri).catch(err => {
server.logger.warn(`failed to connect mongoose: ${err}`);
});
}
// @ts-ignore
server.gateways.mongoose = mongoose;
const gateways = server.config.gateways;
server.gateways.antenna = new RpcMethod(gateways.iotexAntenna);
server.gateways.coinmarketcap = { fetchCoinPrice };
server.gateways.sendgrid = getSendgrid(gateways.sendgrid);
}