ArticleZip > How To Set Up Minimal Aurelia Project From Scratch

How To Set Up Minimal Aurelia Project From Scratch

So, you're ready to kickstart your Aurelia project from scratch? Great! Let's guide you through setting up a minimal Aurelia project step by step. Following these instructions, you'll have a basic Aurelia application up and running in no time.

First off, to create a new Aurelia project, you'll need to ensure you have Node.js installed on your machine. If you haven't already installed Node.js, head over to their website to download and quickly set it up. Node.js provides the necessary runtime environment to run Aurelia efficiently.

Once Node.js is all set, you can proceed to install the Aurelia CLI (Command Line Interface). The Aurelia CLI is a powerful tool that simplifies the process of creating, developing, and building Aurelia applications. To install the Aurelia CLI, open your terminal or command prompt and enter the following command:

Plaintext

npm install -g aurelia-cli

This command will globally install the Aurelia CLI on your system, making it accessible from any directory.

With the Aurelia CLI installed, you can now generate a new Aurelia project. Navigate to the directory where you want to create your project and run the following command:

Plaintext

au new

The CLI will then prompt you to choose a project type. Select the "App" option for a new Aurelia application. Next, you'll be asked to provide a name for your project. Enter a suitable name for your project and hit enter.

After the project has been generated, navigate into the project directory:

Plaintext

cd your-project-name

Once inside your project directory, you can start a local development server to see your Aurelia application in action. Run the following command:

Plaintext

au run --watch

This command will build your application and launch a local server. You can access your Aurelia application by opening a browser and navigating to http://localhost:9000.

Congratulations! You've successfully set up a minimal Aurelia project from scratch. You can now begin customizing and expanding your project to suit your needs.

In summary, setting up a minimal Aurelia project from scratch involves installing Node.js, setting up the Aurelia CLI, generating a new Aurelia project, and running a local development server to preview your application. With these steps completed, you're well on your way to developing impressive Aurelia applications with ease. Enjoy coding!

×