Skip to content

Commit

Permalink
Merge pull request #948 from sascha-egerer/patch-3
Browse files Browse the repository at this point in the history
Return server instance when calling styleguide.server()
  • Loading branch information
varya committed May 24, 2016
2 parents 5a53e48 + f988ab9 commit 3eda817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/styleguide.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,13 +497,13 @@ module.exports.applyStyles = function() {
/* Built-in server */

module.exports.server = function(options) {
startServer(options);
return startServer(options);
};

function startServer(options) {
var port = options.port;
// Ignore start server if we already have instance running
if (!serverInstance) {
var port = options.port;
serverInstance = sgServer(options);
serverInstance.app.set('port', port);
serverInstance.server.listen(serverInstance.app.get('port'), function() {
Expand Down

0 comments on commit 3eda817

Please sign in to comment.