How To Run This Code on localhost?


I just download the code inside the folder that i created which is ‘projects’. but why it is blank once i open it? I am using wamp.



I think what you are missing is that you have to build the app npm run build and then use the new build folder on wamp


let say i have a folder named todo. after i run npm run build, i will just copy the todo folder on my root wamp folder. but why after opening localhost/todo. it is blank?


If your project is named /todo/, then the result of your build process is in /todo/dist folder, and this is the folder you have to deploy.

Also, if you want to serve the project under a localhost/todo subpath instead of localhost/ (root path) you have to let vue-router know that:

const router = new VueRouter({
  routes, // short for routes: routes
  mode: 'history',
  base: '/todo'