Aurelia can be created in many ways. For now, we will develop an application through Aurelia-CLI. To do that, there are three (3) prerequisites that you need to do and set up first in your local machine.
- NodeJS – it’s a downloadable software you can find here: https://nodejs.org/en/
- NPM(Node Packet Manager) – NodeJS comes with a default npm. But, it’s a good practice to update yours regularly. To do that, check your current version by typing this in your command prompt: npm -v. Then to update it type npm install npm -g.
- Git Client – same as the NodeJS, download it in https://desktop.github.com/ or https://git-scm.com/ and install.
These concepts are thoroughly discussed in our Angular tutorial. It may be worthwhile for you to read these lectures before proceeding.
Once you’ve successfully installed the prerequisites, you can now install the Aurelia-CLI itself. To install it globally, type this in command prompt: npm install aurelia-cli -g
Now to test if Aurelia is successfully installed, we’ll install a web server to try running it. First, create a folder in the desktop using command line. For this example, let’s name it as aureliaApp.
Next download the Aurelia package from the Aurelia website and extract it to the newly created folder. Then we’re ready to install the web server type this in the command prompt.
|C:\Users\username\Desktop\aureliaApp>npm install http-server -g|
Your web server is ready to be run. Type this in the command prompt.
|C:\Users\username\Desktop\aureliaApp>http-server -o -c-1|
Finally you should be able to see it in your browser on port 127.0.0.1:8080.