-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use relative url instead of static urls #1078
Conversation
app/constants.js
Outdated
MANGO_INDEX: '/_utils/docs/intro/api.html#documents', | ||
MANGO_SEARCH: '/_utils/docs/intro/api.html#documents', | ||
CHANGES: '/_utils/docs/api/database/changes.html?highlight=changes#post--db-_changes' | ||
GENERAL:'./docs/intro/api.html#documents', |
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 should probably use the getServerUrl here to be more consistent but I had trouble with circular dependencies 😞
app/helpers.js
Outdated
}; | ||
|
||
Helpers.getServerUrl = endpointRoute => { | ||
if (endpointRoute.startsWith("/")) { |
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 remove the first slash to avoid having //_session
@@ -27,7 +27,7 @@ | |||
}, | |||
"app": { | |||
"root": "/", | |||
"host": "../..", | |||
"host": "./", |
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.
In dev, we have a proxy at the root
@@ -42,7 +42,7 @@ | |||
}, | |||
"app": { | |||
"root": "/", | |||
"host": "../..", | |||
"host": "../", |
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.
In a release, Fauxton should be at /_utils/
so we have to get back one "folder".
+1 on this if you can rebase it |
* Add helper functions to get API url and Server urls * Fix some url who were not using relative urls * Fix documentation urls that were using _utils instead of relative * Update test according to change * Changed default configuration in settings.json
87ffcc4
to
a762664
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.
+1
I will compile Couch with this branch and see if there's not breaking change. Then I'll merge when Travis goes green |
Overview
Testing recommendations
I used a express pouchdb setup.
Install depencies with
npm install
You need to edit
node_modules/express-pouchdb/lib/routes/fauxton.js
and change the exports for:Make a fauxton release (
grunt release
) and copy the release tonode_modules/pouchdb-fauxton/www
You need to replace in the index.html of the release (
dashboard
->./dashboard
)You should be good 💃
GitHub issue number
#944
Checklist