-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Proper CLI with commander #603
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
Conversation
@flovilmart updated the pull request. |
1 similar comment
@flovilmart updated the pull request. |
That will prevent anyone to fill in data into bin/parse-server! |
Weird error on travis:
|
@drew-gross if you have a minute for that, that will prevent all mis-usage of bin/parse-server that is piling up bugs... |
}, | ||
"mountPath": { | ||
env: "PARSE_SERVER_MOUNT_PATH", | ||
help: "Mount path for the server, defaults to /" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest defaulting to /parse for consistency with parse-server-example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np!
Looks cool. Are you thinking this should replace the current default method of running the server? Or add a new method? Either way I would like to see some updates to |
We could update the README.md definitely, |
There you go! it doesn't add a new method, bin/parse-server was there for a while. It just makes it harder to edit the bin/parse-server file that some users were doing. This is my preferred method to run it, but that's personal. |
@flovilmart updated the pull request. |
var api = new ParseServer(options); | ||
app.use(options.mountPath, api); | ||
|
||
var port = process.env.PORT || 1337; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put port
into the commander options too? Seems inconsistent to have just this one config be environment variable only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can!
Also, can we please use ES6 style for this one? It's a lot of nice and great new code, but not using ES6 for it looks pretty sad :( |
Overall - looks like an amazing replacement for existing |
I'll ES6ify it! |
@flovilmart updated the pull request. |
|
||
`$ npm start -- path/to/your/config.json` | ||
|
||
The default port is 1337, to use a different port set the PORT environment variable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you updated the code for this setting but you forgot to update the docs :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idiot me, actually that still works :)
@flovilmart updated the pull request. |
- prints help when misconfigured - prints missing appId, masterKey, serverURL
@flovilmart updated the pull request. |
Sweet, I will merge this now so it has some time to stabilize before the next version. The fact that these docs are in |
@drew-gross we could have develop the working branch and default, master being the latest release. with tags? |
Seems reasonable to me. Let see what @nlutsenko and @gfosco think. |
Let's stick with the default flow of GitHub - master is the default branch, which we never break and commit all things to it, meaning that we should be comfortable releasing master at any given point in time. This is the preferred flow for every single open source project. We can simply stage README chagnes that are set for next release in pull requests and merge them before the release, sounds good? |
Agree with Nikita here, about keeping master default and staging readme changes... In addition I'd say we should release new versions whenever we have something, 1-2x per week... |
Fully rewritten CLI with proper environment handling, and args parsing and configuration JSON.