Skip to content

Setting up with CommandBox

Pete Freitag edited this page Apr 16, 2019 · 7 revisions

Setting up with CommandBox

CommandBox is a great tool for many reasons, but one of the best features is that you can easily start a ColdFusion server of (almost) any version. CommandBox will take care of downloading the server for you and starting it on a random (or specified) port number.

First you need CommandBox

Head over to the CommandBox download page and select the binary under With JRE Included that matches your operating system and bitness (you probably want 64 bit).

Copy the box.exe file (windows) or box file (mac) to a folder, for example we will assume if you are on windows that it is here: c:\Downloads\box.exe and on Mac ~/Downloads/box (where ~ is your home directory).

You may want to copy the file to another more permanent location once you see how cool it is!

Run CommandBox

On Windows

On Windows you can simply double click box.exe to bring up a new box shell.

Mac or Linux

On Mac/Linux you will need to open Terminal.app and then type the path to the box binary, eg:

~/Downloads/box

When box loads up you should see an ascii art CommandBox logo, with a prompt.

Download the source code repository

Download the zip archive of this repository and unzip it into the Downloads folder, it should extract to a folder called cfml-security-training-master. If you are familiar with git you can clone the repository locally instead of downloading the zip.

From the box shell use the cd command to navigate to your Downloads directory.

cd /Downloads/cfml-security-training-master/wwwroot

Now use box to start a ColdFusion 2018 server:

server start cfengine=adobe@2018

The box command will download CF 2018 and start it up on a random port, once it is finished it should open the browser to the website.

You Will Also Need An Editor

Open up your favorite CFML editor and point it to the code you just downloaded.

If you do not have a CFML editor on your laptop, a good free option is Visual Studio Code with the CFML Extension installed.

Clone this wiki locally