Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. getConfig()
  2. .then(
  3. config => {
  4.  
  5. fs.readFile(__dirname + '/template.mobileconfig', 'utf-8', (err, template) => {
  6. const mustacheConfig = {
  7. CalDAVHostName: config.davserver,
  8. CalDAVUsername: req.query.username,
  9. CalDAVPassword: req.query.password,
  10. };
  11. const rendered = Mustache.render(template, mustacheConfig);
  12.  
  13. res.status(200).json(rendered)
  14. })
  15. }
  16. );
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement