0.1.1 • Published 3 years ago
volto-plone-reloader v0.1.1
An add-on to pass /@@reload to the backend.
Overview
The Plone addon plone.reload provides a code reloader for your Plone backend.
Unfortunately this currently does not work through a Volto frontend as the route is unknown and the request doesn't get to the backend. Instead you must run it from a different window or tab directly on the backend.
This addon aims to resolve this problem by:
- Creating an express middleware layer to forward requests to /@@reloadto the backend.
- Changes the apiPathto remove the Plone site (@@reloadmust be run from the zope root).
- Adds VirtualHost parameters to the url to ensure the reload actions go through volto.
- Authenticates the call with either admin:admin or admin:secret, the default credentials for plone dev instances.
Installation
Add the addon to your projects package.json:
"addons": [
    "plone-volto-reloader"
],
"dependencies": {
    "plone-volto-reloader": "*"
}Install the add-on and restart Volto:
yarn
yarn startThen the reload middleware will be accesible via http://localhost:3000/@@reload
Credits
Jon Pentland (instification)