Skip to content

Commit

Permalink
Fix listing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Cheung committed Jun 5, 2015
1 parent 7a82b46 commit d850f3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion example/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ swagger.init(app, {
info: {
title: 'Hello World',
version: '1.0.0',
apis: ['./routes.js'],
apis: ['./routes.js']
}
});

Expand All @@ -23,4 +23,7 @@ var server = app.listen(3000, function () {
var port = server.address().port;

console.log('Example app listening at http://%s:%s', host, port);

// FIXME: This is here for testing. Remove when finished.
console.dir(swagger.swaggerObject);
});
6 changes: 3 additions & 3 deletions example/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports.setup = function (app) {
/**
* @swagger
*/
app.get('/', rootHandler)
app.get('/', rootHandler);

/**
* @swagger
Expand All @@ -35,11 +35,11 @@ module.exports.setup = function (app) {
* dataType: string
*/
app.get('/login', loginHandler);
}
};

function rootHandler(req, res) {
res.send('Hello World!');
});
}

function loginHandler(req, res) {
var user = {};
Expand Down

0 comments on commit d850f3f

Please sign in to comment.