Skip to content

Commit

Permalink
Quick docs example
Browse files Browse the repository at this point in the history
  • Loading branch information
gkoberger committed Oct 3, 2016
1 parent d56e42d commit 36f3964
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
17 changes: 17 additions & 0 deletions lib/docs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var request = require('request');

exports.swagger = true;
exports.login = true;

exports.run = function(config, info) {
console.log('Uploading Swagger file...');

request.post(config.host.url + '/', {
'form': {
'swagger': JSON.stringify(info.swagger),
'cli': 1,
}
}, function(err, res, url) {
console.log("https://swagger.readme.io/preview/" + new Buffer(url).toString('base64'));
});
};
6 changes: 0 additions & 6 deletions lib/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ var request = require('request');
exports.swagger = true;
exports.login = true;

/*
* This will completely change 100%, and all files
* uploaded to apis.host will be removed! It's just
* a placeholder to kinda have something that works.
*/

exports.run = function(config, info) {
console.log('Uploading Swagger file...');

Expand Down

0 comments on commit 36f3964

Please sign in to comment.