Can I just make commandbox "aware" of my existing ColdFusion server?

Hi everyone,
I’ve been a cf dev since 1999, and I had heard of Coldbox, but never knew much about it and companies I worked for weren’t using it. I have recently started researching it and I can’t believe I haven’t been demanding it, lol. Anyway, I really want to get a site set up on our dev server and show my coworkers and boss all these cool things and modules, but I’m really struggling with everything because it always seems like my needs are slightly different than the doc examples.
Right now I’m trying to find out if I can make commandbox aware of the cf server that is already started and running on port 8500 of my server. My server is at d:\coldfusion2023\cfusion, and all the app code lives at d:\webcode. I installed a testapp at d:\webcode\testapp, and I have the server.json file as follows:
{
“name”:“webserver”,
“serverList”:“http://localhost:8500”,
“web”:{
“rewrites”:{
“enable”:“true”
}
},
“webroot”:“d:\webcode”
}
I had asked chatgpt how to do this, and it told me to create those settings and then start server webserver, but when I do that, it creates a new war file and starts a lucee engine. I have read every doc and every search result on this that I can get my hands on, and I have watched the entire cfcast for zero to hero commandbox, but I just cannot find the answer. Is this possible? It seems like commandbox is used by folks to manage their servers, so I feel like this has to be possible and I’m just missing something silly.
Thank you in advance for any help.

CommandBox can do a lot of things such as package management (installing modules, etc) and other tools. It can also be used to start up servers, which it does entirely on its own deploying a WAR file on JBoss Undertow. The thing is, if you already have a traditionally-installed CF server on Tomcat and you don’t want to change that, then you basically don’t use CommandBox-- at least not for the server portions. Or, you can use CommandBox on your local machine for development but still deploy to your traditionally installed server on production which is quite common.

CommandBox itself will not do anything with a traditional server installation, outside of reading/writing its config via CFConfig if you want. But those are generally two mutually exclusive concepts.

Hi Brad,
Thanks so much for the quick response. Okay, that’s kinda what I had thought based on the research, but I just wanted to be sure…it’s starting to seem like ChatGPT is always sending me on wild goose chases because I’m asking it things that are way too custom, lol. I did get the cfconfig stuff going, so that’s definitely cool.
I had started on the search for modifying the server because I couldn’t seem to get the cfadmin datasource set up in my testapp, but I eventually found a post that helped and had the coldbox:setting:dsnname as the injection, and the settings = { dsnname = { type:sql, name=cfadmindsn}. I’m going through more cfcasts now trying to follow along with everything.
This is all pretty exciting, but I think I maybe need to focus on a simple coldbox app before I try to implement every other module along with it, haha.
Anyway, love that you guys seem to respond so well to the community, how refreshing, so thanks for that!

3 Likes

We’ve been using CF for a very long time. Like you, we just “discovered” CommandBox and ColdBox a couple of years ago. I went down the same path as you. I thought I’d chime in to say it has really been worth the effort for our shop. CFCASTS is a huge help. The docs are all there. But the startup process was very hard for me. And still is at some level as I get out of my comfort zone. But once you figure it out, you’ll definitely decide it was all worth it. The quick response from Brad was not an anomaly. The Ortus folks are there to help.

3 Likes

Appreciate the encouragement, definitely good to know my skill set isn’t just plain awful. :slight_smile: I’m charging ahead because there are plenty of folks at my company who would never in a million years get this stuff on their own, so it’s going to be up to me (and hopefully a paid training session or something) to show them.

1 Like

@txranger72 Ortus provides a full line of consulting services if you want to get support hours just to ask direct questions of us in a dedicated channel, or have one-on-one zoom meetings, or if you want us to provide an on-site or virtual for your entire team :slight_smile:

To add another positive note, we’ve found Ortus consulting services to be very useful. And they are not pushy about it. In fact, I’ve been encouraged to ask questions on the public channels because Ortus wants to educate the community on issues that might affect a broader audience. When we get down to our specific problems, the consulting approach is the solution.

1 Like

@bdw429s - I saw that, and I fully expect that we may take advantage of that if(when, fingers crossed) we get our next contract extension in a few months and start moving in this direction.
@kurtlook - Thanks again, also good to know, and I can tell that from all the research I’ve had to do so far, especially once I decided to start posting in here.

I’m about to ask another question, but I don’t want to clutter this post because it’s a different topic.

1 Like