Harp is a web static server with pre-processing for Ejs, Jade, Sass, Stylus, Markdown, Harp is written in Node.js. Harp lets you create a static website without any pain. The Harp web server does require any pre-configuration before running. Harp is not limited to creating a static website, It can also be used as a preprocessor for projects that use content that Harp supports to compile, Harp also lets you store your output locally and upload it to your web server, like any other static site generator.

To install Harp, we need to install Node.js first. If you have Node.js you can skip this step.

Installing Harp as a global Node.js package.

sudo npm install -g harp  

Creating our first harp project.

harp init Blog  
cd Blog/  

Running Harp server, by default Harp runs on port 9000.

harp server  

You can change the port to any port you prefer

harp server -p 3000  

If you want to run Harp in production, you must set the Node environment variable into production. Running Harp in production will only re-compile files that have been changed and not the whole Harp application.

NODE_ENV=production  

Harp web server can run on port 80 or you can reverse proxy it with the help on NGINX web server.

Harp is installed on your system; you can read the documentation for more information over Harp

If you have any questions feel free to leave a comment below.

I compiled a list of software and services that I use to improve my workflow, here is the link to the list.

Darryl Dias

I’m Darryl. I’m a 3D Artist, Programmer and Linux enthusiast. On this site I share my insights, tips and tricks, tutorials, methods and best practices.