mirror of
https://github.com/cupcakearmy/cometa.git
synced 2025-03-12 22:37:28 +00:00
19 lines
290 B
JavaScript
19 lines
290 B
JavaScript
const Cometa = require('cometa')
|
|
|
|
// Initialize
|
|
const cometa = new Cometa()
|
|
|
|
// Data
|
|
const template = 'index'
|
|
const data = {
|
|
name: 'World'
|
|
}
|
|
const callback = (err, html) => {
|
|
if (err)
|
|
console.log(err)
|
|
else
|
|
console.log(html)
|
|
}
|
|
|
|
// Do the render
|
|
cometa.render(template, data, callback) |