-
Notifications
You must be signed in to change notification settings - Fork 26
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
vhost/rewrite support? #3
Comments
Yes, not yet. Rewrites should be easy though since they're part of the DB - vhost's might be a little harder, but im willing to give it a shot. |
ok awesome, I wasn't sure if I was missing something for reference: python couchapp just has a root level rewrite.json that turns into the array of rewrites on your design doc. for vhosts you would require server admin credentials and use the _config api.... but that's easy enough to do manually that you wouldn't necessarily need tooling for it (unless you consider a more automated vhost config a big convenience win) |
i got deeper into rewrites over the last few days... http://github.com/maxogden/couchappspora/blob/master/rewrites.json the rewrites at the bottom are the key for vhosts... since it tricks $.couch into thinking you're at the root of a couchdb instance http://wiki.couchapp.org/page/faq has some info under the 'How do I use $.couch.app() behind a vhost?' section |
Rewrite rules can now be added in the rewrites.js file. http://github.com/quirkey/soca/commit/9cbb2a545dd2473df89708edd8425d094cc27eba I think about renaming the file into rewrites.json (couchapp uses the same filename) but config.js has also .js and not .json extension. I thought about how to store the vhost setting: putting it into config.js vs creating a soca command. Any thoughts on this? |
ooh awesome. keeping it in config.js makes sense, as you need admin rights in order to interact with the config api |
I know, this is awesome. Thanks @rmetzler! I'm realizing that maybe it makes sense to add a config option for mapping JSON instead of just directories. That way you could get rid of the need for a special filename for rewrites and just make it in config.js:
Also re:vhosts - I think it makes sense to make it a seperate command, but also be part of the config/push process. Well have to split it by env like:
What do you guys think? |
there doesn't seem to be a way to include rewrites through soca yet. is this correct?
The text was updated successfully, but these errors were encountered: