Star Harp on GitHub

The static web server with built-in preprocessing.

Harp serves Jade, Markdown, EJS, CoffeeScript, Sass, LESS and Stylus as HTML, CSS & JavaScript—no configuration necessary.

sudo npm install -g harp
harp init myproject
harp server myproject
Install Harp

Here’s how Harp helps

Automatic preprocessing

Harp automatically preprocesses code and serves it to the browser as HTML, CSS, and JavaScript. Now you can focus on writing instead of wrangling.

Get started

Write main.scss

$text-color: #F938AB;
body {
  color: $text-color;

…Harp serves main.css automatically

body {
 color: #F938AB; }
<link href="main.css" rel="stylesheet">

Preprocessors are built-in

Harp already includes the preprocessors you love: Markdown, Jade, EJS, LESS, Stylus, Sass and CoffeeScript, are all available without any configuration or setup necessary.

Write CSS with LESSWrite CSS with SassWrite CSS with StylusWrite JavaScript with CoffeeScriptMarkdownJade

The beloved Layout/Partial paradigm

Keep your code clean and organized: reuse common elements with partials, and maintain a consistent site design with layouts. Harp makes both paradigms available to Jade and EJS.

Write _nav.ejs…

<!-- _nav.ejs -->
  <a href="#">Home</a>
  <a href="#">Product</a>
  <a href="#">Services</a>

…include it anywhere, like main.ejs

  <!-- Include _nav.ejs -->
  <%- partial("_nav") %>
  <!-- etc. -->

All inside a fast, lightweight web server

Harp intelligently compiles assets as the browser needs them, so it’s insanely fast. All you have to do is Save and Refresh.

Get started

Flexible, custom metadata

Move from static assets to truly dynamic content by passing metadata into your views and pages. Using your favorite templating engine, variables and loops make writing Harp applications fun and powerful.

Get started

Store metadata in _data.json

"team": {
  "title": "Team page",
  "members": ["Rob", "Brock", "Jorge"]

Use it with Jade or EJS

h1= title
  each member in members
    li= member

Compile and deploy

Whether you’re making a GitHub project page, or a mobile application using Apache Cordova/PhoneGap, you can easily compile your code to HTML, CSS & JavaScript and host it anywhere.

Get started

Harp doesn’t require any configuration to get started. Install Harp in your terminal using the command: npm install -g harp or follow the Quick Start guide.

sudo npm install -g harp
harp init myproject
harp server myproject
Install Harp