Using the Express Server

I’m looking for information on how I can configure different aspects of the express server. Specifically I need to setup a DSN source for use after I run “server start”.

I did end up finding I can run the Web Admin at /ralio-context/admin/web.cfm. I’m still not sure this is the best way to handle this. Does using the admin retain its settings until the “server forget” command is run?

Chris, once the server is started, you can access it’s admin like you found just like any other server. It’s a full bonafide Railo server at that point so feel free to do anything you normally do with a Railo server.

Also, every time you start a server, look in your system tray and you’ll see that there is a little green Ortus icon down there that represents your server. This will stay running until you stop it, even if you close the CommandBox window. Right click on the icon and there is a menu option to open the Railo administrator, open the site, and stop the server. On this note, you can specify a port to the “start” command using the “port” command like so:

start 8080

Or you can set it in your box,json using the “defaultPort” property like so:

init
package set defaultPort=8080

And finally, Railo supports pretty much every setting in Application.cfc, so feel free to configure data sources, etc in your Application.cfc and they will always be retained.

When you start a server, it is stored in two places. Firstly is the servers.json file under the root of the .CommandBox folder in your user directory. This is a json document that tracks all the servers you’ve ever started. Secondly the WEB-INF for your server is placed in .CommandBox/server/custom in a folder named after your server. (Default server name is the folder containing the web root)

So, settings will be retained across restarts by Railo. When you run the “server forget” command, it removes the server from servers.json and deletes the WEB-INF as well. So forgetting a server will remove any configuration that wasn’t stored in the site’s Application.cfc.

Let me know if you still have further questions.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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