These are my solutions to the puzzles on adventofcode.com for 2022.
-
Install nvm to manage node versions
-
Install node LTS
nvm install --lts nvm use --lts
-
Check that node works
node --version
In any dayXX folder, run the script to output the puzzle's solutions:
node main.js
On a new day, copy the skeleton and fetch the input when it's available:
# Copy the skeleton
mkdir day99
cp -r day00 day99
# Fetch input (the positional arg is the day number)
node getInput.js 99 > day99/input.txt