You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
parse-server ignoring my public_html folder for static files, serves files shipped with parse-server #7204
actually expands the public_html directory path to node_modules/parse-server/public_html and therefore serves the files shipped with the current version of the parse-server, not my files shipped along.
The same problem applies with the views directory.
Suggested Fix
Path to public_html and views should either be configurable the same way path the cloud code is using the cloud option here:
or it should first try to lookup dir shipped alongside parse-server and only then fallback to node_modules/parse-server/public_html
Looks like some work has already progressed along these lines to deprecate the use of public_html and views in favor of the new PagesRouter so feel free to close this as will not fix. Filing for future developers that may be hit.
This is expected - although not optimal - behavior when running Parse Server as a module. Feel free to provide a PR to fix this, ideally via a path parameter in the Parse Server options.
Alternatively feel free to enable the PagesRouter that allows you to specify the path and other options. The router is still experimental and is not officially released for use in production critical environments. I will say though that it has been tested extensively and is currently being used in production environments, just so you get a better sense of its maturity.
Sure, please provide any feedback including possible optimizations for the PagesRouter.
The PagesRouter is currently in the docs under "Localization", that being its major feature, but it has other, localization-unrelated improvements as you can find in the related PR.
I am closing this as won't fix as the PagesRouter already provides a fix for this, albeit still in experimental status. Feel free to comment if you have any questions and we can re-open.
Activity
mtrezza commentedon Feb 17, 2021
Thanks for reporting.
This is expected - although not optimal - behavior when running Parse Server as a module. Feel free to provide a PR to fix this, ideally via a path parameter in the Parse Server options.
Alternatively feel free to enable the
PagesRouterthat allows you to specify the path and other options. The router is still experimental and is not officially released for use in production critical environments. I will say though that it has been tested extensively and is currently being used in production environments, just so you get a better sense of its maturity.mtrezza commentedon Feb 17, 2021
I have classified this as bug with severity S3:
PagesRouteror fork Parse Server and override path to public directory inPublicAPIRouter.js.mman commentedon Feb 17, 2021
Thank @mtrezza for classifying this. I will very probably go with the
PagesRouterbut wanted to have this documented.mtrezza commentedon Feb 17, 2021
Sure, please provide any feedback including possible optimizations for the PagesRouter.
The PagesRouter is currently in the docs under "Localization", that being its major feature, but it has other, localization-unrelated improvements as you can find in the related PR.
mtrezza commentedon Mar 11, 2021
I am closing this as
won't fixas the PagesRouter already provides a fix for this, albeit still in experimental status. Feel free to comment if you have any questions and we can re-open.