mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-06-06 09:58:59 +00:00
feat(nestjs): migrate to NestJS
This commit is contained in:
7
packages/server/src/utils/template-render.ts
Normal file
7
packages/server/src/utils/template-render.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import path from 'path';
|
||||
import pug from 'pug';
|
||||
|
||||
export function templateRender(filePath: string, options: Record<string, any>) {
|
||||
const basePath = path.join(global.__resources_dir, '/views');
|
||||
return pug.renderFile(`${basePath}/${filePath}.pug`, options);
|
||||
}
|
||||
Reference in New Issue
Block a user