Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept -p option for local server port #4

Merged
merged 2 commits into from Nov 27, 2013

Conversation

fancyremarker
Copy link
Contributor

Awesome project! I'm using this to document an API written in Rails so I've found it useful to run the server on a port other than 3000.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 4d4ed67 on fancyremarker:p-option-for-port into 7789879 on danielgtaylor:master.

@@ -7,6 +7,7 @@ parser = require('optimist')
.options('o', alias: 'output', describe: 'Output file')
.options('t', alias: 'template', describe: 'Template name or file', default: 'default')
.options('s', alias: 'server', describe: 'Start a local preview server')
.options('p', alias: 'port', describe: 'Port for local preview server', default: '3000')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the default here be a number rather than a string? It looks like the http module coerces it to the proper type but I believe the correct way to do it is with a number.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree. I was thinking I'd match the string format of argv, but an integer is more appropriate. Updated.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling e9d6161 on fancyremarker:p-option-for-port into 7789879 on danielgtaylor:master.

@danielgtaylor
Copy link
Owner

This looks great, thanks!

danielgtaylor added a commit that referenced this pull request Nov 27, 2013
Accept -p option for local server port. Fixes #4.
@danielgtaylor danielgtaylor merged commit d2c53a1 into danielgtaylor:master Nov 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants