A wizard to create a new CFWheels application
$ wheels new
So first, we need to enter an application name. This will be used as the folder name, the default datasource name, and also the Application
this.name value. For this example, we're going to use
CommandBox:test> wheels new ========= Hello! ================================= = Welcome to the CFWheels app wizard. We're here = = to try and give you a helping start for your = = first app. = ================================================== ========= We Need Some Information... ============ = To get going, we're going to need to know a = = NAME for your application. We recommend = = something like myapp to start with = ================================================== Please enter a name for your application: myapp
========= Version?... ============================ = 1) 1.4.5 via Forgebox = = 2) Master Branch via Git = ================================================== Please enter your preferred version [1-2]: 2
When new CFWheels versions get released, we will be adding the recommended options here. At the time of writing this documentation there isn't a stable 2.x release. The Master Branch will essentially do a
git clone from the
For this example, that's what we're after as the CLI doesn't support version
========= And a 'Reload' Password ================ = We also need a 'reload' password. This can be = = something simple, but unique and known only to = = you; Your reload password allows you to restart= = your app via the URL. You can change it later = = if you need! = ================================================== Please enter a "reload" password for your application: foo
To encourage best practice, we ask you to set a reload password: it needn't be complex, but do make it unique!
========= Data...data...data.. ============= = All good apps need data. Unfortunately you're = = going to have to be responsible for this bit. = = We're expecting a valid DataSource to be = = setup; so you'll need mySQL or some other = = supported DB server running locally. Once = = you've setup a database, you'll need to add it = = to the local CommandBox Lucee server which = = we'll start in a bit. For now, we just need to = = know what that datasource name will be. = = = = if you're going to run lucee, we can autocreate = = a development database for you later = ================================================== Please enter a datasource name if different from myapp:
If you'd like your datasource name to be different, you can enter it here, but for our example, we're just keeping with
myapp, and so can just press enter.
========= Default CFML Engine ============= = Please select your preferred CFML engine for = = local development: you can always change it = = later! = = = = 1) lucee 4.5 (Commandbox default) = = 2) lucee 5.x = = 3) Adobe ColdFusion 10 = = 4) Adobe ColdFusion 11 = = 5) Adobe ColdFusion 2016 = ================================================== Please enter your preferred engine: [1-5] 2
This is the CFML engine we're going to add to local
server.json; I'm going to select Lucee 5.x
As you are using Lucee, would you like to use an embedded H2 database for development? [y/n] : y
This then gives me an option to create an H2 database (as I selected Lucee - H2 isn't available in Adobe ColdFusion) - this is a file based database which lives in
/db/h2/ - it's a very useful way to get started very quickly without having to install
mySQL or some other platform. Selecting
y here will write the necessary configuration to
config/app.cfm which will then autocreate the database when the application starts.
Great! Think we all good to go. We're going to install CFWheels in '/myapp/', with a reload password of 'foo', and a datasource of 'myapp'. We're also going to try and setup an embedded H2 database for development mode. Sound good? [y/n] : y
This will then execute the installer.
As you can see, CFWheels is downloaded, then renamed to a directory matching the app name; Various files are written for the request configuration and from that point you just need to do
start to get going!
Updated over 4 years ago