Use npm init To Create New Node Projects
Adding a [TODO: Code shorthand span ] file to a directory turns it into a node project. You can do this manually, or use ` npm init ` . For example :
mkdir new_project_name
cd new_project_name
npm init
You'll be asked a series of questions to configure the setup. I usually just hit enter for all of them. The process produces a [TODO: Code shorthand span ] file based on your answers.
To get something that runs, make an [TODO: Code shorthand span ] file with something like :
js
#!/usr/bin/env node
From there, use [TODO: Code shorthand span ] to install modules. For example, install puppeteer with :
npm i puppeteer
Probably a good idea to do an
git init
And then push in the .gitignore and all that jazz.