Skip to content

shovon/jade-static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jade-static

npm version [![Build Status][http://img.shields.io/travis/shovon/jade-static/master.svg]][https://travis-ci.org/shovon/jade-static] [![Coverage][http://img.shields.io/coveralls/shovon/jade-static/master.svg]][https://coveralls.io/r/shovon/jade-static] GitHub version

Serve static Jade templates from an Express server.

Installing

It's an NPM package. You can just do the following.

npm install jade-static

Usage

Import it via node's require function.

var jadeStatic = require('jade-static');

Then, you would simply add it as a used middleware when you configure your Express server.

var server = express();

// You can watch just about any folder to serve the static Jade files.
server.use(jadeStatic("#{__dirname}/public/"));

Why?

HTML is great and all, but I got pretty tired of its angle brackets. Jade seemed to give me a break from it all. Therefore, I wrote a middleware for node servers running on Express.

What it does

  • Compiles JADE files on the fly.
  • Serves /path/index.jade when /path is requested.
  • Serves /path/index.jade when /path/index.html is requested.

What it doesn't do

  • No caching of any kind

License

MIT

About

Serve static Jade files from an Express server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •