Created
February 3, 2017 14:00
-
-
Save AmbreB/0dea84f2df1e183783fa76c5ce057cf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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