Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Application and asset management to die for.
CoffeeScript JavaScript Shell
Pull request Compare This branch is 2 commits behind zeekay:gh-pages.
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Application and asset management to die for.


Razor-sharp Express DSL

Die supports a Zappa-ish DSL for Express:

die = require('die')
    base: __dirname

app = die.createServer ->
  @set 'view options'
    layout: false

  @get '/', ->
    @render 'index'

  @get '/json', ->
      x: 1
      y: 2
      z: 3

CommonJS module support

Use CommonJS modules in the browser (courtesy of Browserify):

class HomeView extends Backbone.View
  template: require './templates/home'
  render: ->
    @$el.html @template()

Here we are requiring a Jade template (which is compiled to an optimized function) in our Backbone view.

Stylus with nib and Bootstrap baked in

Modernize your CSS with Stylus! Bootstrap and nib baked in:

// everything
@import 'bootstrap'

// only config and forms
@import 'bootstrap/config'
@import 'bootstrap/forms'

  font-size 20px

Awesome testing with Mocha

Mocha has emerged as the best-in-class JavaScript test framework, and Die supports it out of the box.

Multi-app support

By default each app created by Die is reusable by other [Die][die]/Express apps. Example configuration:

die = require('die')
  base: __dirname

app = die.createServer ->
  @use '/app2', require 'app2'
  @use '/app3', require 'app3'
  @use '/app4', require 'app4'

module.exports = app

Each app can of course require other apps recursively.

Project Templates

Never write boilerplate code again, take advantage of Die's project templates. Structure your projects however you like, each file in a template folder will be treated as a Mustache template and can be passed any sort of arbitrary variables when creating a new project with die new. Check out the default templates for examples.


Create new project based off template:

die new <name> [--template <template name>, --install, --production]

Serve project (or just static files):

die run

Compile client-side assets:

die build

Can also be used to build stand-alone CSS and JavaScript assets:

die build --minify --css [in] --css-path [out] --js [in] --js-path [out]

Compile & watch client-side assets, recompiling on change:

die watch

Run tests:

die test
Something went wrong with that request. Please try again.