swank-js/swank-js — pull request #65 by mwolson (2013-03-17 05:26:24+00:00)
Title: Embed swank-js within existing node.js server

Here are some changes I've made to support embedding swank-js within an existing node.js server, with the goal being to inspect and modify state within that server.

I'm looking for comments to see whether honing these changes is worth it. They're not usable as-is for the main repo, but if some of it were made configurable, it might be useful.

One change that could be taken by itself (with some modification) is limiting stacktrace output in errors so that it doesn't overwhelm Emacs REPL buffers.

Example for integrating into another server:

```javascript
var swank = require('swank');

// Optionally start the swank REPL
if (self.config.get('swank:enable')) {
var swankPort = self.config.get('swank:swankPort') || 4005;
swank.startSwankServer(swankPort);
self.log.info('Swank SLIME server listening on http://localhost:' + swankPort);
}
}
```