CommandBox Setup
- Download
CommandBoxfor 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
commandBoxfolder, and execute theboxfile (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.7Note: You can adjust the
nameandportas needed. For subsequent executions, run:
server start sf7-dev
Setting up CommandBox Alias for Easy Execution
- Open the terminal.
-
Edit the file
~/.bashrcor~/.zshrcif your default terminal shell is Zsh by running the following command:
sudo nano ~/.zshrc(You can use
nanoorvimdepending on the editor you prefer). -
Add the following line:
... alias cmbox={YOUR_COMMANDBOX_PATH} ...Here,
cmboxis 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 ~/.zshrcto 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.



Top comments (0)