umma.dev

Starting with Vue.js

I decided it was time to dabble in a new JavaScript framework and picked Vue.js! This blog post is a basic guide to set up a project and will be updated as I start learning more about the framework.

Installation

  • Head to the terminal and type the following command to install Vue on your machine. (Please note there are a number of ways to install vue, so itโ€™s worth looking at the documentation if npm isnโ€™t your first perference.)

npm install vue

  • Vue comes with a CLI

npm i -g @vue/cli @vue/cli-service-global

or

yarn global add @vue/cli @vue/cli-service-global

  • Move to where you would like to keep the project on your machine in your terminal and then type of the following command to create your vue project

vue create <your-project>

  • You will then be asked whether you would like default presets or pick features. Decide what fits best for the needs of your project. I picked default presets to get an app running

Getting Started

  • Once you have created your project, start up the server

cd <your-project>

yarn serve or npm serve

  • You should be able to see your app on http://localhost:8080/