😎 index file

This commit is contained in:
KaizIqbal 2020-07-23 07:48:25 +05:30
parent 3d6b199669
commit 3b12514424
2 changed files with 13 additions and 1 deletions

13
src/index.ts Normal file
View file

@ -0,0 +1,13 @@
import puppeteer from "puppeteer";
(async () => {
const browser = await puppeteer.launch({
ignoreDefaultArgs: process.env.IS_LOCAL ? [" --single-process "] : [],
headless: true,
});
const page = await browser.newPage();
await page.goto("https://google.com");
await page.pdf({ path: "google.pdf" });
await browser.close();
})();

View file

@ -1 +0,0 @@
console.log("Hello World");