Skip to content

Instantly share code, notes, and snippets.

@AmbreB
Created February 3, 2017 14:00
Show Gist options
  • Save AmbreB/0dea84f2df1e183783fa76c5ce057cf3 to your computer and use it in GitHub Desktop.
Save AmbreB/0dea84f2df1e183783fa76c5ce057cf3 to your computer and use it in GitHub Desktop.
getConfig()
.then(
config => {
fs.readFile(__dirname + '/template.mobileconfig', 'utf-8', (err, template) => {
const mustacheConfig = {
CalDAVHostName: config.davserver,
CalDAVUsername: req.query.username,
CalDAVPassword: req.query.password,
};
const rendered = Mustache.render(template, mustacheConfig);
res.status(200).json(rendered)
})
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment