In this guide, we will cover how to deploy a Vue.js app with ZEIT Now.
Create and deploy a new Vue.js project with ZEIT Now without the setup using the button below.
First, set up a Vue.js project using the official Vue CLI to quickly scaffold a batteries-included Vue.js SPA.
If you don't have the Vue CLI installed globally, use the following command to install it globally:
npm i -g @vue/cli
After a successful installation, create a new project and
cd into the project folder. Use the following command in your terminal to do so:
vue create vue-project && cd vue-project
An option to choose a preset will be presented to you after running the command above.
After choosing an option, Vue CLI installs all the required dependencies and provisions a new project for you.
Next, to extend the project with client-side routing; install the official Vue.js router by running the following command in your terminal:
vue add router
Vue CLI adds the router to the project and automatically updates the project files with basic routing functionality.
With your project set up, you are ready to deploy your Vue.js app with Now.
If you have not yet installed Now, you can do so by installing Now CLI.
You can deploy your Vue.js app with a single command:
Once the app is deployed, you will receive a deployment URL similar to the following: https://my-vue-project-ro3oxryae.now.sh/
You can see that routes were successful by going to the generated
/about route directly: https://my-vue-project-ro3oxryae.now.sh/about