-
Notifications
You must be signed in to change notification settings - Fork 77
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
standalone commands #7296
standalone commands #7296
Conversation
266ed55
to
72c4347
Compare
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.
some small comments + Love the cmd api 🙂
const USAGE = ` | ||
Usage: | ||
|
||
node src/cmd api <api_name> <method_name> [<params>] [options...] |
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 would consider adding an example here:
node src/cmd api <api_name> <method_name> [<params>] [options...] | |
node src/cmd api <api_name> <method_name> [<params>] [options...] | |
for example: | |
node src/cmd api object_api read_object_mapping_admin '{ | |
"bucket": "name", | |
"key" : "name", | |
}' |
system: process.env.CREATE_SYS_NAME, | ||
email: process.env.CREATE_SYS_EMAIL, | ||
password: process.env.CREATE_SYS_PASSWD, |
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.
Will we always have those?
const http_port = process.env.PORT || '5001'; | ||
const https_port = process.env.SSL_PORT || '5443'; |
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.
maybe worth moving it to the config.js?
so it will be something like this:
const http_port = process.env.PORT || '5001'; | |
const https_port = process.env.SSL_PORT || '5443'; | |
const http_port = config.PORT; | |
const https_port =config.SSL_PORT; |
|
||
db_client.instance().connect(); | ||
if (process.env.NOOBAA_LOG_LEVEL) { |
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.
Same as above, maybe move into the config.js?
Signed-off-by: Guy Margalit <guymguym@gmail.com>
Signed-off-by: Guy Margalit <guymguym@gmail.com>
@liranmauda Thanks for the comments, these are about re-organizing the config/env, which I am very much interested in. But I will postpone this to next PRs. Thanks |
Explain the changes
src/cmd/*
.src/cmd/api
command to send rpc api like the operator api command.npm run db*
scripts for running postgres on dev env.--unhandled-rejections=warn
to node commands in npm scripts.docs/standalone.md
with build and run instructions.Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
docs/standalone.md