Skip to content

Commit 2ec89a6

Browse files
committed
add fromHtml count
1 parent 9282ba0 commit 2ec89a6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pdf-service.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ let port = 3000;
1313
let calls = {
1414
health: 0,
1515
fromUrl: 0,
16+
fromHtml: 0,
1617
};
1718
let isReady = false;
1819
let browser = null;
@@ -25,6 +26,7 @@ app.get('/health', (req, res) => {
2526
});
2627

2728
app.post('/from-html', async (req, res) => {
29+
calls.fromHtml++;
2830
const html = req.body.html;
2931
const htmlFile = md5(html.substr(0, 100)) + '.html';
3032
const fullHtmlPath = path.join(__dirname, storagePath, htmlFile);
@@ -123,7 +125,7 @@ function md5(seed) {
123125

124126
app.listen(port, () => {
125127
console.log(`Kool PDF service running at port ${port}`);
126-
console.log(`Going to start puppeter`);
128+
console.log('Going to start puppeter');
127129

128130
(async () => {
129131
browser = await puppeteer.launch({

0 commit comments

Comments
 (0)