nathan-hinshaw/pattern-library — pull request #1 by steder (2014-02-14 06:49:14+00:00)
Title: Express

## What

Use `expressjs` to create a really simple devserver. Using `PHP` and `Apache` seems like extra hassle when you already have `node`. Frankly for deployment it seems like just saving the generated files from the devserver as html may be completely sufficient.

## Caveats

What I've implemented here is not completely feature complete compared to the `PHP` version but I think it's reasonable. Things that are supported that are used:

- load a list of pattern html files from `dist/patterns/*.html`

Things that are supported that don't seem to matter because there aren't any:

- load a list of usage example text files from `dist/patterns/*.txt`

Unsupported things in the `Node` version are happily not currently used:

- add `

` markup around groups of patterns (no patterns are currently grouped in sub-directories)
- display groups around directories of patterns in the select box (again, no patterns currently grouped)

It seems easy to tackle those things if / when they are needed.

## Usage

Probably the simplest thing to do is:

```bash
$ npm install -g express nodemon grunt
$ nodemon app.js