Our first Puppeteer code
We first need to create a folder where our hello-puppeteer
project will be located. I'm going to use a terminal, but you can use whatever you feel more comfortable with. Our project will be called hello-puppeteer
:
> mkdir hello-puppeteer > cd hello-puppeteer
We now need to initialize this brand-new node.js application. We create new applications in node.js using the npm init
command. In this case, we will pass the -y
argument, so it creates our app using default values:
> npm init -y Wrote to /Users/neo/Documents/Coding/hello-puppeteer/package.json: { "name": "hello-puppeteer", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, ...