Skip to content

Hot reloading for backend

Richard Smith-Unna requested to merge reload into master

This adds hot reloading for the backend.

By default it watches the app directory. Additional files, directories or glob patterns to watch can be added by passing the --watch [path|glob] argument to pubsweet run --dev. The --watch arg can be passed any number of times.

Using this setup a dev can work on backend app files, any number of backend components, plus the pubsweet-backend simultaneously, and enjoy hot reloading on all of them. In the following example the dev will have done npm link some-linked-component and npm link pubsweet-backend in the app directory:

pubsweet run --dev --watch ~/code/some-linked-component --watch ~/code/pubsweet-backend

Merge request reports