adamfowleruk / mljs

MarkLogic REST API JavaScript wrapper for NodeJS and Browser Apps
http://adamfowleruk.github.io/mljs/apidocs/core/tutorial-all.html
Other
33 stars 19 forks source link

Bug: MLDB ignores database name, only obeys rest port #30

Closed adamfowleruk closed 10 years ago

adamfowleruk commented 11 years ago

When using the REST API, the content database is specified by the REST API port (server) you are connecting to. Specifying db.configure({database: "mycontent"}) would be effectively ignored.

Instead we need to ignore port: the first time around and use the admin port to lookup the correct rest server instance for the "mycontent" database. Only if this fails should we fall back to the port setting.

This also needs documenting very clearly.

adamfowleruk commented 10 years ago

Removing this as an issue. Port is not unreasonable to use. If we forced port lookup, you would always need to configure an admin user/pass, which is bad practice