From the course: Learning Static Site Building with Hugo

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Set up Node and npm

Set up Node and npm

From the course: Learning Static Site Building with Hugo

Start my 1-month free trial

Set up Node and npm

- [Narrator] We'll write the code that deploys the side files in JavaScript and run it with node js. To follow along, you'll need to have Node installed on your machine. You can check that with node -v. If you don't have Node installed, go to the Node download page on nodejs.org and follow their instructions. Installing Node also installs npm, the node package management tool. We'll use npm to download some packages the deployment script needs and later, we'll also use npm to run the script itself. Let's start with npm init -y which will start a new npm project in this folder. And then, I need to do npm install --save and install a few packages we need for this script. We need a package called glob, I need a package called upath and also one called ssh2-sftp-client. Npm downloaded these packages into a folder called node_modules. I need to add that folder to my get ignore file. Do that in here in vs code, I'll say node_modules, now it's ignored. Now, I'll open up package.jsin which…

Contents