CommandBox Setup
- Download
CommandBox
for the stable version (it’s recommended to download the one that includes JRE). - Save it to a specific folder and then extract the contents.
- Open the terminal, navigate to the extracted
commandBox
folder, and execute thebox
file (it’s recommended to set up an alias, see the instructions in this step). - Navigate to the directory
./SoulFaceBackEnd/main/src/web
. -
For the first execution, run this command:
server start name=sf7-dev port=8080 cfengine=lucee@5.3.7
Note: You can adjust the
name
andport
as needed. For subsequent executions, run:
server start sf7-dev
Setting up CommandBox Alias for Easy Execution
- Open the terminal.
-
Edit the file
~/.bashrc
or~/.zshrc
if your default terminal shell is Zsh by running the following command:
sudo nano ~/.zshrc
(You can use
nano
orvim
depending on the editor you prefer). -
Add the following line:
... alias cmbox={YOUR_COMMANDBOX_PATH} ...
Here,
cmbox
is the alias you'll use to execute CommandBox in the terminal. You can customize the alias name as you like.{YOUR_COMMANDBOX_PATH}
should be replaced with the path where you extracted CommandBox. Run
source ~/.zshrc
to apply the changes and restart your Zsh shell configuration.
Commands You Can Use in the Command Box
-
server start {project_name}
– Start your project server. -
server restart {project_name}
– Restart your project server. -
server stop {project_name}
– Stop a running project server. -
server list
– Show all projects on the server, whether running or stopped.
Note: You can add optional parameters such as
port
,javaHome
, or others as needed.