Home > Web Front-end > JS Tutorial > body text

Detailed explanation of LAN access steps for webpack+vue project

php中世界最好的语言
Release: 2018-05-09 13:50:16
Original
2510 people have browsed it

This time I will bring you a detailed explanation of the LAN access steps for the webpack vue project. What are the precautions for LAN access for the webpack vue project? The following is a practical case, let's take a look.

Idea: Fix your project startup IP and port. Of course, the port can also be the default 8080

Steps:

1. Check your ip in the LAN

Command line ipconfig

2.Reply Go to your development directory and find comfig/index.js in the root directory

Modify host: your own LAN ip

Modify port: Custom port - it is best not to use 80 or Other commonly used ports

Example: comfig/index.js

host:'http://192.168.2.153',//一定要加上 http 
port:3000
Copy after login

Note:This Once the ip is fixed, the local host or localhost will not be accessible. This ip must also be used. The same applies to the LAN. Use this ip to access

I believe you have mastered the method after reading the case in this article. Please pay attention for more exciting things. Other related articles on php Chinese website!

Recommended reading:

FIFO/LRU implementation of caching algorithm

How to operate Node static resource server

The above is the detailed content of Detailed explanation of LAN access steps for webpack+vue project. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template