Simple Example

This commit is contained in:
nicco 2018-02-09 15:00:19 +01:00
parent 5f571406c7
commit 0115cb7d97
3 changed files with 19 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,3 @@
{
"dependencies": {}
}

View File

@ -0,0 +1 @@
Hello {{name}}!