Setting up a development environment

Published on January 3, 2017 by

Now that you have seen how to set up Vue.js in JSFiddle, I just want to briefly show you how you can set up a simple development environment on your own machine. To keep things simple, I am not going to get into Webpack or the Vue CLI now, as I will cover this in later articles. So to easily get up and running, there are two simple approaches right now, the first being to use the CDN as we did in the previous article.

The first thing I will do, is to create an HTML file that will contain pretty much the same code as you saw in the previous article.

<div id="app">
   <h1>{{ message }}</h1>

The next thing we need to do, is to add a script tag for Vue.js, so I will just go ahead and grab the CDN URL from

<script src=""></script>

Now it’s time to add our JavaScript code. Simply add this inline at the bottom of the page, but it could also be loaded from an external file.

<script type="text/javascript">
   new Vue({
      el: '#app',
      data: {
         message: 'Hello World!'

If you open the HTML page in a browser, you should see “Hello World!” being rendered on the page.

Alternatively you can download the Vue.js file instead of using the CDN. Just save the JavaScript file from and save it in your project’s root directory.

Now all that’s left to do, is to replace the URL in the script tag with a path on the file system that is relative to the project directory.

<script src="vue.js"></script>

If you open up the browser once again and refresh the page, you should see the same result as before.

So if you prefer to follow along with this setup rather than using JSFiddle, then this is how you can do it. Later in the series, I will get back to setting up a more advanced development environment, but for now, these options are sufficient.


Learn Vue.js today!

Take an online course and become an Vue.js champion!

Here is what you will learn:

  • How to build advanced Vue.js applications (including SPA)
  • How Vue.js works under the hood
  • Communicating with services through HTTP
  • Managing state of large applications with Vuex
  • ... and much more!
Vue.js logo
Author avatar
Bo Andersen

About the Author

I am a back-end web developer with a passion for open source technologies. I have been a PHP developer for many years, and also have experience with Java and Spring Framework. I currently work full time as a lead developer. Apart from that, I also spend time on making online courses, so be sure to check those out!

Leave a Reply

Your e-mail address will not be published.