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 HarpLooking for the Harp Platform?

Here’s how Harp helps

Automatic preprocessing

Harp automatically preprocess code and serves it to the browser as HTML, CSS, 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 {
 text-color: #F938AB; }
<link href="main.css" rel="stylesheet">

Preprocessors are built-in

Harp already includes the preprocessors you love: Markdown, Jade, 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 main.scss

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

Write main.scss

<body>
  <!-- Include _nav.ejs -->
  <%= partial("_nav") %>
  <h1>Services</h1>
  <!-- etc. -->
</body>

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
ul
  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.

Or, skip compiling all together, and publish from Dropbox with the Harp Platform.

Get started

Harp doesn’t require any configuration to get started. Install Harp through with npm install -g harp or follow the Quick Start guide.

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