14 lines
326 B
JavaScript
14 lines
326 B
JavaScript
const { createLog } = require('../dist/log');
|
|
const { Templates } = require('../dist/templates');
|
|
|
|
const log = createLog('tmpl-test');
|
|
|
|
(async function main () {
|
|
const tmpl = new Templates('./views');
|
|
try {
|
|
await tmpl.build();
|
|
} catch (err) {
|
|
log.error(err);
|
|
}
|
|
log.info(tmpl.render('index', { body : 'test' }));
|
|
})() |