The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Use npm init To Create New Node Projects

TODO: Pull subtitle into page object

Adding a `package.json` file to a directory turns it into a node project. You can do this manually, or use `npm init`. For example:

code_start_default_section code_end_default_section

And then push in the .gitignore and all that jazz.

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Use npm init To Create New Node Projects

-- p

Adding a `package.json` file to a directory turns it into a
node project. You can do this manually, or use `npm init`.
For example:

-- code/
-- shell

mkdir new_project_name
  cd new_project_name
  npm init

-- /code

-- p

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
`package.json` file based on your answers.

-- p

To get something that runs, make an `index.js` file with something like:

-- code/
-- js

#!/usr/bin/env node

  console.log('here')

-- /code

-- p

From there, use `npm i` to install modules. For example, install puppeteer with:

-- code/
-- shell

npm i puppeteer

-- /code

-- p

Probably a good idea to do an

-- code/
-- shell

git init

-- /code

-- p

And then push in the .gitignore and all that jazz.


-- categories
-- JavaScript 
-- Node 

-- metadata
-- date: 2021-09-30 13:32:09
-- id: 20eov4tj
-- status: scratch 
-- type: post
-- SCRUBBED_NEO: false
-- site: aws