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

How to use nodeJs anywhere to build a local server environment

php中世界最好的语言
Release: 2018-05-30 10:58:28
Original
1922 people have browsed it

This time I will show you how to use nodeJs anywhere to build a local server environment. What are the precautions for using nodeJs anywhere to build a local server environment. The following is a practical case, let's take a look.

First go to the nodeJs official website to download the latest version of nodeJs https://nodejs.org/en/

InstallationAfter successful win r open cmd input node -help or node -v check whether the installation is successful

After installation, enter npm install anywhere -g to install anywhere. Note that if it is a Mac system, you will be prompted that you have insufficient permissions. You need to add sudo before the code to obtain administrator permissions. That is sudo npm install anywhere -g.

As shown in the picture after installation.

Then find the web page folder you need to open and use the CD command on the command line to drag the folder into the corresponding directory

As shown in the picture, I entered There is a folder on the desktop called canvasGobangqi

and then enter the anywhere command

to create a local server. Send the address 192.168.9.105:8000 in the picture above to your mobile phone and you can view your webpage on the mobile phone. You can also send it to other colleagues on the same intranet so that they can see your web page. At this time, you can modify the JS CSS HTML in Editor. After saving, it will be reflected to this address synchronously. Isn't it very convenient?

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to use less in angular6

##How to optimize js async function

The above is the detailed content of How to use nodeJs anywhere to build a local server environment. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!