Hi Erik, is there any reason why the code can’t reside on the file system as opposed to a modules database? I tried this to no avail. When developing locally, I’m able to save edits to files a lot faster on the file system than over a WebDAV server. Just half a second to a second, but that adds up.
For one AngularJS app, I started with a plain vanilla HTTP server, and then when I was ready to work with $resource, I setup a REST server on another port. I thought I’d be able to develop the app on the file system on the HTTP server, but of course I ran into cross-domain JS security, being on two different ports (using a 2-tier architecture). So I conflated the servers, but that meant moving the code to a modules database. BTW, thanks again for all your help in the workshop :-) Best, Shannon > Hi, Danny: > > The REST API doesn't support sharing modules databases between REST servers > or providing an interface for renaming managed resources in the modules > database. > > There could be a number of issues (for instance, permissions on the options > file), but working through the issues on an unsupported operation would be > guesswork. > > Part of the rationale for the one-to-one relation between modules databases > and REST servers was to make it easy to package up a REST implementation on a > development environment and push it to a production server. > > Can you expand on the issues you're running into with that one-to-one > approach? > > > Thanks, > > > Erik Hennum > > ________________________________ > From: > general-bounces at developer.marklogic.com [general-bounces at > developer.marklogic.com] on behalf of Danny Sinang [d.sinang at gmail.com > ] > Sent: Wednesday, April 29, 2015 8:12 AM > To: general > Subject: [MarkLogic Dev General] Moving REST API Instance module code to a > directory in Modules database > > We have a REST API instance running on port 9042 on our DEV cluster and it > works fine. > > When this instance was created, a new modules databases called > 9042_imagechallenge-rest-modules was created for it by ML. > > I'm trying to avoid minimize the number of modules databases we have, so I : > > 1. Copied the code from 9042_imagechallenge-rest-modules to a new directory > called "/imagechallenge_rest" in our Modules database. > > 2. Reconfigured our 9042-imagechallenge-rest app service to use > /imagechallenge_rest as its root and Modules as its modules database. > > After step 2, I visited : > > > http://marklogic-dev.mycompany.com:9042/v1/search?q=published:true&options=image_challenge > > > and now I'm getting this error : > > <error-response xmlns=" > http://marklogic.com/xdmp/error" > > > <status-code>400</status-code> > <status>Bad Request</status> > <message-code>REST-INVALIDPARAM</message-code> > <message>REST-INVALIDPARAM: (err:FOER0000) Invalid parameter: No configured > options: image_challenge</message> > </error-response> > > > I checked the /imagechallenge_rest directory and this "missing" option file > is indeed under : > > /imagechallenge_rest/Default/9042-imagechallenge-rest/rest-api/options . > > > What could I be missing ? > > Regards, > Danny > > _______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general