Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of React Project Management

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "the method of React project management". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

For a complete project, we definitely need to build a server. In our project, we use node.js to build web services. As far as node.js is concerned, it can be thought of as Apache+php.

The directory of the whole project is as follows

The api directory is the Node.js interface, src is the React source code, and the builds directory stores the packaged Javascript source code.

It is important to note that although the files in api, src, and builds are all js files, those in api belong to Node.js, which runs on the server. Js in builds is used for client requests and runs on browsers. Therefore, we must not confuse the two.

For how to use Node.js to build a Web service, I have simple code in the server.js above. You can look at the contents of the server.js file to see how to build the web service. You can also download the complete code as a reference.

So before we officially start learning, we should simply build a web service. After building the web service, we can modify the code in src. There are many ways to modify the code on the server. We can use svn to check out the code on the server locally, write React code in a local editor, and then submit it through svn. This allows you to modify the code in src. In the article "getting started with React-Building a React runtime environment", we said that using the webpack-watch command can listen to whether the code in src has changed, and if it changes, it will be automatically repackaged into builds. So we just need to modify the code that submitted to us.

If the Ip address of my server is 192.168.5.201, the port on which the node service listens is 1001. At this point, the src in the tag below becomes the http access method.

Hello React!

This is the end of the content of "methods of React Project Management". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report