working examples

This commit is contained in:
nicco
2018-02-13 22:13:42 +01:00
parent 5e527b45d1
commit a904940d8c
2 changed files with 7 additions and 4 deletions

View File

@@ -1,6 +1,9 @@
const Cometa = require('../../dist/cometa.js')
// Initialize
const cometa = new Cometa()
// Data
const template = 'index'
const data = {
name: 'World'
@@ -12,4 +15,5 @@ const callback = (err, html) => {
console.log(html)
}
cometa.renderTemplate(template, data, callback)
// Do the render
cometa.render(template, data, callback)