function renderPage(page, obj, cb) {
	if (typeof obj == 'function' && !cb) {
		cb = obj;
	}
	let pageToRender = path.join(__dirname, '..', 'views', 'partials', `${page}.html`);
	Handlebars.render(pageToRender, obj).then((html) => {
		cb(null, html);
	}, (err) => {
		cb(err);
	});
}
// Simple function for server-side rendering
Simple function for server-side rendering
Simple function for server - side rendering
function renderPage(page, obj, cb) {
	if (typeof obj == 'function' && !cb) {
		cb = obj;
	}
	let pageToRender = path.join(__dirname, '..', 'views', 'partials', `${page}.html`);
	Handlebars.render(pageToRender, obj).then((html) => {
		cb(null, html);
	}, (err) => {
		cb(err);
	});
}
function renderPage ( page , obj , cb ) { if ( typeof obj == 'function' && ! cb ) { cb = obj ; } let pageToRender = path . join ( __dirname , '..' , 'views' , 'partials' , ` ${ page } ` ) ; Handlebars . render ( pageToRender , obj ) . then ( ( html ) => { cb ( null , html ) ; } , ( err ) => { cb ( err ) ; } ) ; }
Simple function for server-side rendering
Simple function for server - side rendering