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

webpack vue project development environment LAN binding IP method

php中世界最好的语言
Release: 2018-05-04 09:09:09
Original
2279 people have browsed it

This time I will bring you the webpack vue project development environment LAN binding IP method, the webpack vue project development environment LAN binding IP What are the precautions, the following is a practical case, let's take a look .

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

Steps:

1. Check your own ip in the LAN

Command line ipconfig

2. Return to your own Development directory, find comfig/index.js

in the root directory. Modify host: your own LAN ip

Modify port: custom port - preferably not Use 80 or other commonly used ports

Example: comfig/index.js

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

Note:Once the ip here is fixed, the local host or localhost will not be accessible. This ip must also be used. The same is true for LAN access.

I believe you have mastered the method after reading the case in this article. More Please pay attention to php中文网otherrelated articles for exciting content!

Recommended reading:

Summary of vue data transfer methods

How to implement query dynamic parameter passing in vue-router

vue storejs data acquisition instructions

The above is the detailed content of webpack vue project development environment LAN binding IP method. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!