divshot/superstatic — pull request #57 by mbleigh (2014-04-02 22:25:04+00:00)
Title: Superstatic Service Architecture

**Services** are separate NPM modules that extend the functionality of `superstatic` in one way or another. One example is environment configuration, another might be an HTTP Proxy.

## Configuration

Each service should be named `superstatic-servicename` and will be configured in `superstatic.json` under `services`. For example:

```json
{
"services": {
"env": {},
"proxy": {}
}
}
```

There will be a few common configuration options that will be shared by all services.

* **mount:** a URL at which to mount this service. By default, this will be `/__/servicename`

## Implementation

I'm not sure how this should work exactly yet, but I imagine it something like Connect middleware, maybe with an extra `config` object passed in that provides the configuration.