I recently applied a genetic data application (using API 23andMe) to Heroku and integrated Universal SSL using Cloudflare. My data is stored in a free Sandbox plan using the MLab addon on Heroku. 23andMe data is stored in MLab. As soon as I added my site to Cloudflare, data was rarely displayed on the page. In 99% of cases, MLab data is not displayed, but in 1% of cases.
router.get('/tools/my-genetics', ensureAuthenticated, function(req, res) {
var data = {};
if(req.user) {
SNPs.find({user_id: req.user._id}).then(function(result) {
data.genes = result;
})
res.render('tools/gene_data', {
data: data,
user: req.user,
layout: 'dash'
});
}
});
, , Heroku, , SSL Heroku. Handlebars.js .handlebars. - , MLAB handlebars Cloudflare?
Cloudflare?
:
{{#each}}
<ul class="list-group">
<li class="list-group-item lead">1. For {{diseases.0.snp}}, your Genotype is {{genotypes.rs28936694}}. This snp is {{diseases.0.risk}} {{diseases.0.descr}} This snp is located on {{diseases.0.location}}.
</li>
<li class="list-group-item lead">2. For {{diseases.1.snp}}, your Genotype is {{genotypes.rs3825942}}. {{diseases.1.risk}} {{diseases.1.descr}} This snp is located on {{diseases.1.location}}.
</li>
<li class="list-group-item lead">3. For {{diseases.8.snp}}, your Genotype is {{genotypes.rs1048661}}. {{diseases.8.risk}} {{diseases.8.descr}} This snp is located on {{diseases.8.location}}.
</li>
</ul>
{{/each}}