19 lines
290 B
JavaScript
Raw Normal View History

2018-02-21 19:50:42 +01:00
const Cometa = require('cometa')
2018-02-13 22:13:42 +01:00
// Initialize
2018-02-09 15:00:19 +01:00
const cometa = new Cometa()
2018-02-13 22:13:42 +01:00
// Data
2018-02-09 15:00:19 +01:00
const template = 'index'
const data = {
name: 'World'
}
const callback = (err, html) => {
if (err)
console.log(err)
else
console.log(html)
}
2018-02-13 22:13:42 +01:00
// Do the render
cometa.render(template, data, callback)