Access URLs in server.js script?
Thanks for your work on swagger-suite... It has a lot of promise.
Is there a way to access the URLs for each service (UI, editor, docs) so that I can use the 'open' package to pop them open in a browser?
Not sure what you mean by "URLs for each service". You should be able to access them at http://<host>:<port>/ui, http://<host>:<port>/editor, and http://<host>:<port>/docs.
My question was really, how can I get the host & port values programmatically after launching swagger-suite so I can use the 'open' package to launch them in a browser automatically rather than having to type it in?
On Thu, Jul 30, 2015 at 10:59 PM, James Messinger [email protected] wrote:
Not sure what you mean by "URLs for each service". You should be able to access them at http://
: /ui, http:// : /editor, and http:// : /docs. — Reply to this email directly or view it on GitHub https://github.com/BigstickCarpet/swagger-suite/issues/7#issuecomment-126550539 .
If you have a host & port number specified in your Swagger API, then Swagger Suite will use that. Or, if you don't want to put that in your API definition, then you can pass a port number to the start() method:
// Start Swagger Suite on port 8080
server.start(8080);