Install a Coldbox Site

It is possible to get incredibly nuanced in your Coldbox Installation but the out-of-the-box installation is powerful and usually more than adequate for most sites.

Making Backups for Existing Files

  1. Because the ColdBox installation is usually done into an empty folder it will overwrite and existing files. Before installing ColdBox make a few backups mv server.json serverBU.json mv .cfconfig.json .cfconfigBU.json mv index.cfm indexBU.cfm

Installing CommandBox

  1. Open CommandBox and navigate to the root of your new site

  2. Type coldbox create app to get started. This will install a ColdBox Application to that folder.

  3. From your IDE, copy the web.bindings, web.host and web.http nodes from serverBU.json to server.json

  4. Copy the justEnough datasource an the cfmappings node from your .cfconfigBU.json to the .cfconfig.json.

  5. Edit the Application.cfc to make this.datasource="justEnough", the datasource we created with cfConfig.

  6. Restart the server but note we're going to get an error.

  7. Run dotenv populate --new. All of the default values provided will work fine.

  8. Restart the server which should work this time.

  9. Type server log --follow to watch the start up process unfold

  10. Reload https://justenough.local/ to see the new page

Once the server opens, you'll see that the main page has changed. However, if you hit the endpoint with an XHR call, it will still fail because of CORS. We'll address that in the next issue.

Last updated