How to build a single | vue spa example
Server-sideInthistutorial,wewillonlytalkaboutwritingaclientwith Vue.WewillnottalkaboutcreatingaRESTserver.SoIwillusethe jsonplaceholder.typicode.com service providesthefakeonlineRESTAPI.Anyway,ifyouwanttouseDrupalasabackend(jeez,itistheDrupalwebsite,ofcourse,youdo),we’vealreadywrittenabouthowtoorganizeaRESTfulserverwithDrupal8.CheckthearticlesonRESTfulintheblockUsefullinks.Client-sideToolsItisreallyeasytostartusingVue.Butitmightbecomeeveneasierifyouusetherighttools.Thereisavue-awesomeproject...
Server-sideIn this tutorial, we will only talk about writing a client with Vue. We will not talk about creating a REST server. So I will use the jsonplaceholder.typicode.com service provides the fake online REST API. Anyway, if you want to use Drupal as a backend (jeez, it is the Drupal website, of course, you do), we’ve already written about how to organize a RESTful server with Drupal 8. Check the articles on RESTful in the block Useful links.
Client-side ToolsIt is really easy to start using Vue. But it might become even easier if you use the right tools.
There is a vue-awesome project that includes a list of all kinds of tools, components libraries and plugins for any occasion.
Vue-cliFor jump-starting a new project, I highly recommend Vue-cli. Using this you can start the project with some of the official Vue project templates or one of the many of the open-source Vue templates and, of course, you can create your own one and use it anywhere.