[ Announcement ] Even more new stuff for you to test!

server.json is now implemented in CommandBox.

https://ortussolutions.atlassian.net/browse/COMMANDBOX-266

server set port=8080
server show port
server start

All settings that you can start a server with are persisted and re-used on the next start and can be shipped with a project as defaults in the server.json file in the webroot.

So if you want to ship an app that requires a custom rewrite file for instance, you place a server.json in the root and the first time it is started, it will suck in those settings.

Any server settings changed via “server set” are automatically persisted in the server.json

So settings are loaded with this precedence

  1. Typed by the user into the start command parameters
  2. Read from box.json
  3. Internal defaults from the ServerService

This is really great. For our work, we usually create a “startserver.sh” + “startserver.bat” file - this will eliminate the need for that elegantly. Thanks Brad :slight_smile:

That’s great to hear. Try it out and if there’s anything else missing let me know so we can add it.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com