[Vuejs]-How to install vue.js inside a repository?

0๐Ÿ‘

Okay, I found the answer myself.

First, vue cli needs to be installed locally. So inside cmd cd to your local repository and execute:

npm install vue-cli

After this, install the serve functionality like this:

npm install -g serve

and then you can just do:

serve

And you get something like this on your cmd:

   โ”‚   Serving!                                        โ”‚
   โ”‚                                                   โ”‚
   โ”‚   - Local:            http://localhost:5000       โ”‚
   โ”‚   - On Your Network:  http://172.21.128.28:5000   โ”‚
   โ”‚                                                   โ”‚
   โ”‚   Copied local address to clipboard!              โ”‚

Optionally, you can also first build your project and then serve your dist, so after install your serve functionality, first do:

npm run build

and then

serve -s dist

and you should be fine. You can read about some of this stuff here too:
https://cli.vuejs.org/guide/deployment.html#general-guidelines

Leave a comment