Github user robertkowalski commented on a diff in the pull request:
https://github.com/apache/couchdb-nmo/pull/14#discussion_r47223951
--- Diff: src/query.js ---
@@ -0,0 +1,98 @@
+import prettyjson from 'prettyjson';
+import nmo from './nmo.js';
+import Promise from 'bluebird';
+import { getUrlFromCluster, sendJsonToNode } from './utils';
+
+export function cli (cluster, dbname, ...args) {
+ return new Promise((resolve, reject) => {
+ if (!cluster || !dbname || !args) {
+ const msg = [
+ 'Usage:',
+ '',
+ 'nmo query <cluster> <database> create <fields> [--json]',
+ 'nmo query <cluster> <database> <selector> [--json]',
+ ].join('\n');
+
+ const err = new Error(msg);
+ err.type = 'EUSAGE';
+ return reject(err);
+ }
+
+ let promise;
+
+ if (args[0] === 'create') {
--- End diff --
i don't get an ok if i create an index:
```
(14:13:41) [robert@tequila-work] ~/apache/couchdb-nmo (pr/14) $
./bin/nmo-cli.js query anemone restaurants create foo
http request POST http://127.0.0.1:15984/restaurants/_index
http 200 http://127.0.0.1:15984/restaurants/_index
(14:13:52) [robert@tequila-work] ~/apache/couchdb-nmo (pr/14) $
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---