mirror of
https://github.com/cupcakearmy/cometa.git
synced 2025-09-06 13:00:39 +00:00
Simple Example
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const Cometa = require('../../dist/cometa.js')
|
||||
const cometa = new Cometa()
|
||||
|
||||
const template = 'index'
|
||||
const data = {
|
||||
name: 'World'
|
||||
}
|
||||
const callback = (err, html) => {
|
||||
if (err)
|
||||
console.log(err)
|
||||
else
|
||||
console.log(html)
|
||||
}
|
||||
|
||||
cometa.renderTemplate(template, data, callback)
|
Reference in New Issue
Block a user