Closed StaticActual closed 6 years ago
I think this is/was a known issue. Two things come to mind there.. you can just delete the Packages
collection instead of resetting the db, then reload will reimport. (so before you edit,save delete the running instance Packages
collection). And also ReactionCore.Router._routesMap
and ReactionCore.Router.Reload()
should allow you to view and reload the router.
Issue moved to reactioncommerce/reaction-feature-requests #24 via ZenHub
When building a plugin with custom routes, the database must be reset in order for changes to route and template names to take effect.
Expected behavior
Editing custom routes in
register.js
should trigger a server restart and changes should take effect.Actual Behavior
Changes only seem to take effect if the database is reset.
Steps to Reproduce the Behavior
Edit the name of a template in
register.js
and in that template file. Notice that the application still looks for the old template name even after server restart, meaning that the template name for that route must be stored in the database somewhere.Running
reaction reset -n
updates to reflect your changes.Versions
Max OSX Sierra 10.12.1 Node: 6.2.2 NPM: 4.0.5 Docker: 17.03.1-ce Reaction CLI: 0.8.0 Reaction: 1.1.1 Reaction Branch: master