This example will show you how to quickly get a hello world Aurelia application up and running using the Aurelia CLI.
The Aurelia CLI is a Node.js based application, so make sure you install it first before proceeding. You will need Node.js 4.4.7 or later.
You will also need a Git client installed. Some great options include: Github Desktop, Sourcetree and Git SCM.
Provided you installed Node.js and Npm correctly, open up a Command Prompt/PowerShell or Bash terminal and install the CLI globally using the following command:
npm install aurelia-cli -g
Before proceeding, run au -v
to make sure that the Aurelia CLI successfully installed. You should see a version number displayed.
Now you have the CLI installed, to create a new project run the following command and following the informative on screen prompts:
au new
You'll get a choice of different formats and loaders, to keep things simple just select the defaults. As you become more familiar with the CLI, you can configure these options to match your needs.
To run your Aurelia application, from the same folder run: au run
- you should now see a fully-functioning hello world application when you open up your application in a web browser. By default, the CLI dev server will be available at http://localhost:9000
You have just successfully created a "hello world" Aurelia application using the CLI.