[LINUX] When it is troublesome to copy what you built with vue

vue.js will display what you created for the time being if you do npm run serve. However, depending on the development environment, you may not be able to connect to the outside unless you build it and put it in the specified directory, so do you want to build and check it? ??

However, even though I changed it a little, it is troublesome to have to move the contents of the dist directory created by npm run build to another place every time. In such a case, creating a symbolic link will work. Instead of putting the file directly in the public directory, you can link to it and read a file in another directory.

For example, the public directory is / var / www / html / nginx / publish / website, Assuming that the directory used for development is / home / oogaki / dev / website Previously, the files in / home / oogaki / dev / website / dist that were built were copied to / var / www / html / nginx / publish / website.

However, if you delete the / var / www / html / nginx / publish / website directory and do the following, you can save time.

cd /var/www/html/nginx/publish/
ln -s /home/oogaki/dev/website/dist website

Now, the contents read in / var / www / html / nginx / publish / website will be the contents of / home / oogaki / dev / website / dist.

I am using the ln command, but how to specify it is

ln -s Link destination path Link name

It is in the form of. In the first place, it is one way to change the directory to be read in the server settings such as nginx, but when you do not want to mess with the server settings, it is convenient to use symbolic links.

Recommended Posts

When it is troublesome to copy what you built with vue
When you want to use it as it is when using it with lambda memo
[OpenCV] When you want to check if it is read properly with imread
[AWS] What to do when you want to pip with Lambda
When it is troublesome to set up an SMTP server locally when sending mail with Python.
It is better to use Weight Initializer when initializing with HeNormal with Chainer
What are you comparing with Python is and ==?
What are you using when testing with Python?
It is more convenient to use csv-table when writing a table with python-sphinx
What to do if you get an error when installing python with pyenv
Settings when you want to run python-mecab with travis
[Python] What to do when No module named'pyproj.datadir' appears when Exe is done with PyInstaller
Links to do what you want with Sublime Text
When you want to filter with Django REST framework
What I did when I was angry to put it in with the enable-shared option
What to do if you get an Import Error when importing matplotlib with Jupyter
When the variable you want to superscript with matplotlib is two or more characters
What is pip and how do you use it?
[Introduction to Python] What is the important "if __name__ =='__main__':" when dealing with modules?
Things to do when you start developing with Django
What to do when you can't bind CaboCha to Python
[Python] What is a tuple? Explains how to use without tuples and how to use it with examples.
What to do if you get an Undefined error when trying to use pip with pyenv
Solution when you want to use cv_bridge with python3 (virtualenv)
What to do when Japanese is not displayed on matplotlib
Is it possible to detect similar images only with ImageHash?
When I try to push with heroku, it doesn't work
What to do when PyCharm font is strange or garbled
Use aggdraw when you want to draw beautifully with pillow
Move what you installed with pip to the conda environment
What to do if you can't sort files with subscripts
What to do when an error occurs with import _ssl
When you want to register Django's initial data with relationships
[C language] Close () It is dangerous to retry when it fails
ImportError: No module What to do when you are told
If you try to make a word cloud with comments from WEB manga, it is interesting to visually understand what kind of manga it is.
[Python] What is a slice? An easy-to-understand explanation of how to use it with a concrete example.
[For IT beginners] What to do when the rev command cannot be used with Git Bash
[Python] What is pip? Explain the command list and how to use it with actual examples
What to do when a part of the background image becomes transparent when the transparent image is combined with Pillow
NameError: global name'dot_parser' is not defined and what to do when it comes up in python
Relive the dream you missed! (However, it is limited to Pepper)
A note on what you did to use Flycheck with Python
A memorandum when I tried to get it automatically with selenium
[Beanstalk] What to do when an error occurs with import uuid
When you want to print to standard output with print while testing with pytest
What to do if you get a UnicodeDecodeError with pip install
When you want to send an object with requests using flask
[TensorFlow] If you want to run TensorBoard, install it with pip
What to do if you can't build your project with Maven
It is convenient to use Icecream instead of print when debugging.
What to do when you get "I can't see the site !!!!"
How to utilize Python with Jw_cad (Part 1 What is external transformation)
What to do when the value type is ambiguous in Python?
When you want to adjust the axis scale interval with APLpy
What to do if you get a "Wrong Python Platform" warning when using Python with the NetBeans IDE
How to write what to do when an application is first displayed in Qt for Python with Designer
What to do when you get angry that libxml / xmlversion.h does not exist when you put lxml with pip
What is Python? What is it used for?
[Python] What is a with statement?
What to do when Ubuntu crashes