2

I have a ColdBox monolith we will be migrating into modules. The directory structure is

/myapp
  /handlers
    /admin
      person.cfc
      product.cfc
    /user
      cart.cfc
    global.cfc
    main.cfc

I'm trying to load an external module that is structured like

/otherRepositoryRoot
  /myappModules
    /admin
      /handlers
      /models
      /views
      ModuleConfig.cfc
    /user
      /handlers
      /models
      /views
      ModuleConfig.cfc 

Pretty standard. We have lots more in the /admin and /user handlers folders; this is just a sample.

We need /myapp/admin/product/index to still run from the monolith, but move the person.cfc handler to .../myappModules/admin/handlers/.

The problem is when I specify this.entryPoint = "/admin"; in the admin ModuleConfig.cfc file, I try to visit /myapp/admin/person/index in the browser and get stuck in a redirect loop.

Is there a way for the CB routes to look in the host application's /handlers first and fall back to loaded modules? (or try modules first and fall back to /handlers?)

note: the modules will be in an external location since they will be shared by other applications and are being placed in a separate repo. Not sure if that makes any difference as far as naming since I think the same issue would exist even if we installed them from the other repo in /modules

jinglesthula
  • 4,446
  • 4
  • 45
  • 79

0 Answers0