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
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.jsonmv .cfconfig.json .cfconfigBU.jsonmv index.cfm indexBU.cfm
Installing CommandBox
Open CommandBox and navigate to the root of your new site
Type
coldbox create appto get started. This will install a ColdBox Application to that folder.From your IDE, copy the web.bindings, web.host and web.http nodes from serverBU.json to server.json
Copy the justEnough datasource an the cfmappings node from your .cfconfigBU.json to the .cfconfig.json.
Edit the Application.cfc to make this.datasource="justEnough", the datasource we created with cfConfig.
Restart the server but note we're going to get an error.
Run
dotenv populate --new. All of the default values provided will work fine.Restart the server which should work this time.
Type
server log --followto watch the start up process unfoldReload 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