FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...


v1.3.3 Public

BrowserSync for CommandBox

BrowserSync will automatically refresh your browser window whenever you save files, allowing for fast, efficient development.


Install browsersync using commandbox:

install commandbox-browsersync

This tool requires nodejs, (unfortunately). Once you install that, cd to your site root and:

browsersync [ proxyPort = random ] [ fwreinit = true ]

browsersync 4500 false (proxy port will be 4500, no fwreinit)

proxyPort ( default: random ) and fwreinit ( default: true ) are both optional.

If the npm dependencies don't exist we'll attempt to install them for you.

Caviat Emptor

  • The npm installs will likely fail if your site is in a dropbox folder or has anything else running that may lock files. If npm fails, shut down any program that is using the site folder while the installs are going on. This part of the process only happens once.
  • If you're on Windows, you should also not run the npm installs "as administrator" unless you're logged in as administrator. The global packages are saved under a user account and will not be available unless you're running everything under that account.
  • If you want us to reinit the framework automatically on core file changes (models, handlers, config, interceptors) you must have a "/healthcheck" route or handler set up. This route is set up by default in /config/router.cfc when using coldbox create app.

    return "Ok!"; 

The tool can launch your commandbox server if it's not already running and will create a nodejs browsersync proxy at your commandbox server port + 1, if that port is available, or another random port if not. Any changes to files in your layouts, views, handlers or models folders will cause the browser to reload.

Browsersync also has a UI that lets you configure its behavior, including the ability to throttle bandwidth so you can simulate slow links (from mobile devices, for example) You should be able to reach it at http://localhost:3001

Dependencies (0)

Dev Dependencies (0)

commandbox-browsersync change


  • fixed hang on no healthcheck route bug


  • fixed watch folders/framework reinit bug


  • changed to using random proxy ports instead of forcing 3000


  • added fwreinit for core files


  • no longer overwriting package.json if it exists.

$ box install commandbox-browsersync

No collaborators yet.
  • {{ getFullDate("2020-04-21T19:51:28Z") }}
  • {{ getFullDate("2020-04-26T10:09:24Z") }}
  • 1,645
  • 83