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
From the course: Learning Static Site Building with Hugo
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Deploy via FTP overview2m 2s
-
(Locked)
Set up Node and npm1m 40s
-
(Locked)
Connect to the server7m 21s
-
(Locked)
Collect the local files4m 51s
-
(Locked)
Remove old files from the server5m 39s
-
(Locked)
Upload the site content2m 43s
-
(Locked)
Deploy via FTP with Travis CI1m 57s
-
(Locked)
FTP next steps1m 2s
-
-
-
-