yeoman/yeoman — pull request #641 by blai (2012-10-16 08:31:40+00:00)
Title: Issue #625: Integrate Yeoman with Express js

Update server task such that it can now use a custom server script (must be connect or a compatible Node.js server framework), as long as the server script use module.exports to return the connect object (or Expressjs object)

User can either start the server like this: `yeoman server:TASK:PATH_TO_SERVER_START_SCRIPT` (e.g. `yeoman server:app:./server` or `yeoman server:dist:./anotherServer`

Or user can configure the server like this: (in Gruntfile.js)
```javascript
module.exports = function( grunt ) {
...

server: {
app: {
main: './server'
},
dist: {
main: './server'
}
}

...
};
````

#### A sample server script:
```javascript
var express = require('express');
var app = express();

app.get('/hello/:name', function(req, res) {
res.send('app1 ' + req.params.name);
});

module.exports = app;
````