uber/fixed-server — pull request #6 by mlmorg (2014-03-26 07:21:02+00:00)
Title: Add initialize function for server setup

I often find myself wanting to interact with the express server and set it up a certain way before making requests to it. For example, if you're testing a global middleware and want to use some jade templating:

```js
var fixedServer = FixedServer.fromFile('./fixtures/fixed-server', {
port: 1337,
initialize: function (app) {
app.engine('jade', jade.__express);
app.set('view engine', 'jade');
app.use(myGlobalMiddleware());
}
});
```
And if you'd like to set your server up on a per-test basis, you could do something like (with the addition of #5:

```js
fixedServer.createServer(['GET 200 /']).setup(mySetupFunc).run();
```

This might not be the best approach, but something along these lines would be very useful!