You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: about-this-book.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,13 @@ We highly encourage contribution to this book and our open source software. The
18
18
19
19
## Charitable Proceeds
20
20
21
-
15% of the proceeds of this book will go to charity to support orphaned kids in El Salvador - [http://www.harvesting.org/](http://www.harvesting.org). Please donate and purchase the printed version of this book as every book sold can help a child for almost 2 months.
21
+
15% of the proceeds of this book will go to charity to support orphaned kids in El Salvador - [http://www.harvesting.org/](http://www.harvesting.org/). Please donate and purchase the printed version of this book as every book sold can help a child for almost 2 months.
Shalom Children’s Home ([http://www.harvesting.org/](http://www.harvesting.org)) is one of the ministries that is dear to our hearts located in El Salvador. During the 12 year civil war that ended in 1990, many children were left orphaned or abandoned by parents who fled El Salvador. The Benners saw the need to help these children and received 13 children in 1982. Little by little, more children came on their own, churches and the government brought children to them for care, and the Shalom Children’s Home was founded.
27
+
Shalom Children’s Home ([http://www.harvesting.org/](http://www.harvesting.org/)) is one of the ministries that is dear to our hearts located in El Salvador. During the 12 year civil war that ended in 1990, many children were left orphaned or abandoned by parents who fled El Salvador. The Benners saw the need to help these children and received 13 children in 1982. Little by little, more children came on their own, churches and the government brought children to them for care, and the Shalom Children’s Home was founded.
28
28
29
29
Shalom now cares for over 80 children in El Salvador, from newborns to 18 years old. They receive shelter, clothing, food, medical care, education and life skills training in a Christian environment. The home is supported by a child sponsorship program.
Copy file name to clipboardExpand all lines: config-settings/endpoint-settings.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ These settings are used to configure CommandBox's endpoints.
10
10
11
11
**string**
12
12
13
-
The API Token provided to you when you signed up for [ForgeBox.io](https://www.forgebox.io). This will be set for you automatically when you use the `forgebox register` or `forgebox login` commands. This token will be sent to ForgeBox to authenticate you. Please do not share this secret token with others as it will give them permission to edit your packages!
13
+
The API Token provided to you when you signed up for [ForgeBox.io](https://www.forgebox.io/). This will be set for you automatically when you use the `forgebox register` or `forgebox login` commands. This token will be sent to ForgeBox to authenticate you. Please do not share this secret token with others as it will give them permission to edit your packages!
14
14
15
15
```bash
16
16
config set endpoints.forgebox.APIToken=my-very-long-secret-key
Copy file name to clipboardExpand all lines: config-settings/misc-settings.md
+48
Original file line number
Diff line number
Diff line change
@@ -89,3 +89,51 @@ config show tabCompleteInline
89
89
```
90
90
91
91
.png>)
92
+
93
+
## developerMode
94
+
95
+
The `developerMode` setting reloads shell before each command to help testing changes to CommandBox core or modules.
96
+
97
+
```
98
+
config set developerMode=true
99
+
```
100
+
101
+
It will prevent you from needing to use the `reload` command, but it will cause a delay before each command. Don't forget to turn this back off when you're done.
102
+
103
+
## terminalWidth
104
+
105
+
Terminal width can be overridden for entire CLI. This will affect ASCII art, interactive job output, progress bars, and the table printer.
106
+
107
+
```
108
+
config set terminalWidth=150
109
+
```
110
+
111
+
## offlineMode
112
+
113
+
The `offlineMode` setting will disable most external HTTP calls. This can be useful for
114
+
115
+
* testing production server starts to ensure they aren’t reliant on external calls
116
+
* running `box` in a secure network which blocks or flags any external access
117
+
118
+
```bash
119
+
# enable offline mode
120
+
config set offlineMode=true
121
+
122
+
# go back to normal
123
+
config set offlineMode=falses
124
+
```
125
+
126
+
 This setting is obeyed in the following parts of CommandBox:
Copy file name to clipboardExpand all lines: deploying-commandbox/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
CommandBox may also be used in production or continuous deployments, since it allows you to orchestrate your server environment. This eliminates dependency on hardware, and makes your CFML applications more portable, as a whole. 
4
4
5
5
{% hint style="info" %}
6
-
For advanced server configurations, be sure to check out the [`CFConfig` module](https://cfconfig.ortusbooks.com).
6
+
For advanced server configurations, be sure to check out the [`CFConfig` module](https://cfconfig.ortusbooks.com/).
7
7
{% endhint %}
8
8
9
9
Since the startup of a CommandBox server allows you specify a host and server port, you can easily bind your server to a machine IP address and specify which port it should serve the application on. This allows you to proxy traffic to the application from IIS, Apache, or NGINX and even allows you to serve traffic directly on HTTP port 80 or 443, if you choose.
Copy file name to clipboardExpand all lines: deploying-commandbox/heroku.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3

4
4
5
-
The [Heroku buildpack for CommandBox](https://github.com/ortus-solutions/heroku-buildpack-commandbox) will allow you to deploy your CFML applications directly to [Heroku](https://www.heroku.com) (or to [Dokku](http://dokku.viewdocs.io/dokku/) hosts) using CommandBox to manage your CFML engine. It allows you to specify your custom server configuration settings using the CommandBox server API, avoiding additional script and configuration files during the Heroku deployment process.
5
+
The [Heroku buildpack for CommandBox](https://github.com/ortus-solutions/heroku-buildpack-commandbox) will allow you to deploy your CFML applications directly to [Heroku](https://www.heroku.com/) (or to [Dokku](http://dokku.viewdocs.io/dokku/) hosts) using CommandBox to manage your CFML engine. It allows you to specify your custom server configuration settings using the CommandBox server API, avoiding additional script and configuration files during the Heroku deployment process.
Copy file name to clipboardExpand all lines: developing-for-commandbox/README.md
+10
Original file line number
Diff line number
Diff line change
@@ -19,3 +19,13 @@ CommandBox's expressive CLI gets its power from commands. You can create your ow
19
19
Customizing the internals of CommandBox is achieved via an event model known as interceptors. What this means is that at pre-defined points in the lifecycle of the shell, command execution, or web server starting, the CLI broadcasts events that you can listen to. This lets you provide custom error handling, special server handling, or modify command output. Interceptors are packaged up in modules and can be combined with custom commands and config settings for fully-configurable shell add-ons.
20
20
21
21
[Read about **Developing Interceptors** here.](interceptors/)
22
+
23
+
## Developer Mode
24
+
25
+
The `developerMode` setting reloads shell before each command to help testing changes to CommandBox core or modules.
26
+
27
+
```
28
+
config set developerMode=true
29
+
```
30
+
31
+
It will prevent you from needing to use the `reload` command, but it will cause a delay before each command. Don't forget to turn this back off when you're done.
Copy file name to clipboardExpand all lines: embedded-server/README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ config set server.defaults.trayEnable=false
40
40
41
41
## Full Control
42
42
43
-
CommandBox's embedded server does not require any prior installations of any CFML engine to work. It does not use Apache, IIS, or Nginx. A very lightweight Java web server called [Undertow](http://undertow.io) is used and a context is programmatically deployed via a WAR file.
43
+
CommandBox's embedded server does not require any prior installations of any CFML engine to work. It does not use Apache, IIS, or Nginx. A very lightweight Java web server called [Undertow](http://undertow.io/) is used and a context is programmatically deployed via a WAR file.
44
44
45
45
You should still have all the options you need to set up most local development servers quickly. The web-based administrator is available to you where you can edit any setting, add data sources, CF mappings, and mail servers. To see a list of all the parameters you can pass to the `server start` command, refer to the [CommandBox API Docs](http://apidocs.ortussolutions.com/commandbox/5.0.0/index.html?commandbox/system/modules\_app/server-commands/commands/server/start.html) or run `server start help` command directly from the CLI.
Copy file name to clipboardExpand all lines: embedded-server/configuring-your-server/experimental-features.md
+36
Original file line number
Diff line number
Diff line change
@@ -84,5 +84,41 @@ server set runwar.args="--cache-servlet-paths=true"
84
84
85
85
Standard Adobe ColdFusion installations have a similar cache of "real" paths from the servlet context that is tied to a setting in the administrator called "Cache Webserver paths" but that setting is not available and does not work on CommandBox servers for some reason..
86
86
87
+
## Custom Log Pattern
87
88
89
+
The Java logging library Log4j is used for servers' log files and console logs. The default logging pattern is:
88
90
91
+
```
92
+
[%-5p] %c: %m%n
93
+
```
94
+
95
+
You can customize this with any valid Log4j pattern layout, which you can find here:
This would put the date/time into every log message:
100
+
101
+
```
102
+
server set runwar.args='--log-pattern "[%-5p] %d{dd MMM yyyy HH:mm:ss.SSS} %c: %m%n"'
103
+
```
104
+
105
+
This would log ONLY the message with no severity or category:
106
+
107
+
```
108
+
server set runwar.args='--log-pattern "%m%n"'
109
+
```
110
+
111
+
Note, the color coding of log lines in CommandBox is dependent upon the default Log4j pattern layout.
112
+
113
+
## Disable Resource Manager Change Listener
114
+
115
+
There is an XNIO file system watcher started for the web root and any virtual directories in your server. This change listener serves two purposes:
116
+
117
+
* Cache invalidation for the servlet path lookup matching
118
+
* Cache invalidation for welcome file lookups
119
+
120
+
In normal operations you should have no issues with this, but it has been observed starting a server in a web root with a very large number of files (like over 200,000) can consume a lot of resources, and even cause out of memory errors. The change listener in Undertow can be disabled with this setting:
121
+
122
+
```
123
+
server set runwar.args='--resource-manager-file-system-watcher=false'
Copy file name to clipboardExpand all lines: embedded-server/configuring-your-server/server-port-and-host.md
+8
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,14 @@ server show web.SSL.enable
40
40
server show web.SSL.port
41
41
```
42
42
43
+
#### Setting SSL Enabled protocols
44
+
45
+
You can customize what SSL protocols your HTTPS listener will respond to with the following XNIO option. Supply a comma-delimited list of valid protocols.  
46
+
47
+
```
48
+
server set runwar.XNIOOptions.SSL_ENABLED_PROTOCOLS=TLSv1.3,TLSv1.2
49
+
```
50
+
43
51
### HTTP/2
44
52
45
53
HTTP/2 is a newer standard of HTTP supported by all modern browsers. HTTP/2 is enabled by default any time you are using an HTTP/HTTPS listener, however all major browsers will only allow the server to negotiate HTTP/2 over an HTTPS connection. HTTP/2 runs over the same port and only changes the exchange between the server and browser. You can disable HTTP/2 support like so:
Copy file name to clipboardExpand all lines: embedded-server/server-logs.md
+59
Original file line number
Diff line number
Diff line change
@@ -122,3 +122,62 @@ server log myServername --follow --rewrites
122
122
```
123
123
124
124
Your rewrites log will be auto-rotated every 10MB. The amount of information that appears in the rewrites log will be affected by the `--debug` and `--trace` flags when you start the server.
125
+
126
+
## Request Dumping
127
+
128
+
There is a feature you can use to dump all the header details for an HTTP request and response in the form of an Undertow handler called `dump-request()`. Just include the following server rule in your `server.json`
129
+
130
+
```javascript
131
+
{
132
+
"web": {
133
+
"rules": [
134
+
"dump-request()"
135
+
]
136
+
}
137
+
}
138
+
```
139
+
140
+
To fire only for certain requests, you can pair the handler with any predicate you wish:
141
+
142
+
```
143
+
{
144
+
"web" : {
145
+
"rules" : [
146
+
"regex('(.*).cfm') -> dump-request()"
147
+
]
148
+
}
149
+
}
150
+
```
151
+
152
+
Then start your server with the `--console` flag or tail the console with `server log --follow` and you'll see info like this for each request:
Copy file name to clipboardExpand all lines: embedded-server/server-versions.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ One minor difference to keep in mind is Lucee server and Adobe ColdFusion use a
14
14
5.3.4.80
15
15
```
16
16
17
-
However, [CommandBox](https://commandbox.ortusbooks.com) and [ForgeBox](https://www.forgebox.io) use the [npm-flavored semantic versioning](https://commandbox.ortusbooks.com/package-management/semantic-versioning) (semver) which is slightly different. Basically the build ID is moved to the end after a plus (+) sign.
17
+
However, [CommandBox](https://commandbox.ortusbooks.com/) and [ForgeBox](https://www.forgebox.io/) use the [npm-flavored semantic versioning](https://commandbox.ortusbooks.com/package-management/semantic-versioning) (semver) which is slightly different. Basically the build ID is moved to the end after a plus (+) sign.
Lucee has a modular core and comes bundled with a bunch of extensions that approximate the functionality that comes bundled with Adobe ColdFusion. But that means you are loading the Hibernate libraries, PDF libraries or JDBC drivers even if you don't need them. There is a second type of Lucee server called "Lucee Light" which contains all the core engine, but with zero extensions. People creating custom docker builds for example will start with Lucee Light and then add back only the extensions their app needs. To get a feel for all the Lucee extensions available, see [this page](https://download.lucee.org) that lists all official extensions.
79
+
Lucee has a modular core and comes bundled with a bunch of extensions that approximate the functionality that comes bundled with Adobe ColdFusion. But that means you are loading the Hibernate libraries, PDF libraries or JDBC drivers even if you don't need them. There is a second type of Lucee server called "Lucee Light" which contains all the core engine, but with zero extensions. People creating custom docker builds for example will start with Lucee Light and then add back only the extensions their app needs. To get a feel for all the Lucee extensions available, see [this page](https://download.lucee.org/) that lists all official extensions.
80
80
81
81
We're now publishing CF Engines to ForgeBox based on the Lucee Light builds which allows you to start up a Lucee Light server. These are under a ForgeBox package named `lucee-light` and we've also backfilled all the same versions that exist for the normal `lucee` engine. Note, the three bullets points above apply to Lucee Light as well, Just replace `lucee` with `lucee-light` and you're good to go.
Your CommandBox is sent to you via a zip archive. Decompress the archive to a location of your choice. The **No JRE Included** download will only have one file in it named `box`. For Windows users, this will be an `exe` file. For unix-based users, it will be an executable binary. The **With JRE Included** version will have a `jre` folder. You can move `box.exe`, but keep the `jre` folder in the same relative location as the executable so it can be found.
Now just double click the file from your GUI, or execute it via a console window. This will start a short, quick, one-time process of unpacking CommandBox into your user's home directory. Congratulations, CommandBox is now installed! You'll still run the same executable binary every time you want to use the CLI, but the extraction process won't need to happen again.
37
37
@@ -41,7 +41,7 @@ The green `CommandBox>` prompt is what we call the _interactive shell_. Type `ex
To open up the interactive shell at any time, just double click on the `box` executable. If you prefer to stay in your OS's native shell, then just place the `box` file in your system path and add it before any CommandBox commands like so:
Copy file name to clipboardExpand all lines: ide-integrations/visual-studio-code.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ What do you want to do with VSC?
11
11
12
12
## Installing VSCode
13
13
14
-
This IDE has it's own domain. ( [https://code.visualstudio.com/](https://code.visualstudio.com) ) with downloads for **macOS**, **Windows** and **Linux** on the home page. :+1:
14
+
This IDE has it's own domain. ( [https://code.visualstudio.com/](https://code.visualstudio.com/) ) with downloads for **macOS**, **Windows** and **Linux** on the home page. :+1:
15
15
16
16

0 commit comments