current position:Home>Step by step, configure nodesjs environment with hbuilder for Vue JS development
Step by step, configure nodesjs environment with hbuilder for Vue JS development
2022-04-29 18:12:21【Hexi stone】
In our last blog post, we talked about the use of... In wechat applet development asp.net Of webservice service , This blog post uses hbuild3.2.16 as well as nodes13.14.0 Let's talk about hbuilder Lower model nodes.js do js Project development ,webservice The establishment of the server . Of course , You can also set up a service to provide data and network services for other applications .
One 、 install nodes
First step , Install first node.js, You can download it on the official website , about win7 It is worth noting that you should choose the corresponding version , Some don't support win7 Of , Support win7 The last version number of is :[node-v13.14.0-x64.msi]( If you are windows10 You can use the above operating systems according to your windows Version to determine higher nodes.js)(https://nodejs.org/download/release/v13.14.0/node-v13.14.0-x64.msi)
Each step is completed according to the default point , No more details here . Is the installation successful , You can come to cmd In mode , Let's see , Enter the following command to detect
If it can be displayed normally, it means success
Two 、 To configure node.js plug-in unit
by hbuilder Configuration plug-ins , stay " Tools " Under the menu “ Plug in installation ” Next , Open the following dialog box
Instant installation complete ! If you use vscode To write node.js You still need to pass cmd To configure the installation vue,hbuilder Automatically complete directly when you create a new project (hbuilder and vue It is seamless ).
of vue Support for , One more sentence , according to hbuilder Introduction to the official website ,hbuilder3.25 after , Yes vue3 Our support is stronger . So you can download the higher version hbuilder!
3、 ... and 、 Create a new project to test the previous results
Create a new project to see , We assume that the project name is test( A lower... Is selected here vue edition 2.6.10 In order to run smoothly , You can according to your windows Version to determine higher vue)
Click Create , We must wait for a while , Because the system needs to prepare a lot of documents and environment for the project . The creation is complete , We can do it in node_modules See a complex directory tree , This is the document prepared for us . Click its properties and you will find 85~10M
Right click the item name , Compile
Next run , Continue to click... Under the external command in the right-click menu npm run serve. function
therefore , We can access it through the page , Try it :
Four 、 Start writing code
1、 Look at the default home page of the project (index.html)
Familiar with a little html All the children's shoes know , The content is usually written in body Inside the label , From the code above, we can see , What a clean content , Where did the default words and figures in the above figure come from ? Is there a mistake , Let's add two lines
Run to observe , you 're right , It's this file , The page has changed , The second line added is all inside . OK, the first line is gone .
There's something fishy in this line , It should be the applied style , there id="app" It must be the problem , Look at the application id Label style
<div id="app" ><strong>First nodejs project</strong></div>
Get rid of it , The world is clean , as for app How to implement it? We can check src In the catalog app.vue And the documents contained in it helloworld.vue, We won't discuss it here for the time being .
copyright notice
author[Hexi stone],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/119/202204291637407602.html
The sidebar is recommended
- About node JS server related concepts
- Access control module (2)
- About virtual lists
- Developing figma plug-in using Vue 3 + vite
- Learn more about the garbage collection engine of chrome V8 JavaScript engine
- Vue3 uses vite instead of webpack
- How to upload applet code through node? Just take a look
- Using H5 video tag in Vue to play local video in pop-up window
- What is the difference between classes in Es5 and ES6?
- [Vue] play with the slot
guess what you like
[Part 4 of front-end deployment] using docker to build cache and multi-stage construction to optimize single page applications
Vue2 simple use of vant (based on Vue CLI)
node. JS server
React uses concurrent mode. When the rendering phase exceeds the time slice, high priority tasks jump the queue. How will the lanes on the fiber of the previous task be solved
Vuecli2 multi page, how to remove HTML suffix
Vue router dynamically modifies routing parameters
How to use webpack or configure quasar after context isolation is turned on by electron?
Vue3 how do parent components call child component methods
Es learning notes (I): http request
【Java WEB】AJAX
Random recommended
- Java project: nursing home management system (java + springboot + thymeleaf + HTML + JS + MySQL)
- Java project: drug management system (java + springboot + HTML + layui + bootstrap + seals + MySQL)
- Java project: agricultural material management system (java + springboot + easyUI + HTML + Maven + MySQL)
- How do Vue, native JS and jQuery feel about development
- The Ajax backend accepts post data and writes it directly to the database
- Java project: agricultural material management system (java + springboot + easyUI + HTML + Maven + MySQL)
- Brother Lao Yu takes you to play with esp32:14 and personally make a two-way wireless remote control (I)
- How to create JavaScript custom events
- A king's time, I learned nginx
- Vue quick start (with actual small items: Notepad, weather forecast, music player)
- Vue: convert user input to numeric type
- - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repom
- vue. config. Understanding of agent in JS
- After the node is successfully installed, CMD can be executed, but the compiler webstorm runs NPM install and prompts that there is no solution to this command
- How to develop and deploy front-end code in large companies
- Vue assigns permissions to buttons through instructions
- [development diary from 22 years to April] Vue problems encountered in actual projects and their solutions
- [methodology 1] CSS development skills - global style setting and local style
- vue3. 0 dynamically bind and obtain DOM through ref;
- How to use HTML to display segmentation
- How to use HTML for touch event in mobile terminal
- How to define and use HTML box model
- How to use the box pack attribute and box align attribute inside the box in HTML
- What are the differences and relationships among HTML, CSS and JS
- How to save home page as HTML
- How to solve the post request return 405 of nginx reverse proxy to HTML page
- How to upload pictures without refresh with HTML5 + PHP
- How to define HTML text tags, pictures, paths, hyperlinks and anchors
- How to upload static HTML files to the host or server
- How to use calculated and watch in Vue
- How does Vue Preview PDF, word, xls, PPT and txt files
- Can jQuery listen for events
- Luxury cars "senseless price increase", the configuration of the new Porsche Macan remains unchanged, with a maximum increase of 19000 yuan
- 1-ch579m program upgrade OTA (self built Internet of things platform) - ch579m uses its own Ethernet to remotely download and upgrade MCU program through HTTP (MCU program rotation check and update)
- The front-end downloads files, and the back-end sends gzip files. Is there a way to get the file size?
- Why does Vue route jump refresh the page?
- The conversion code of Babel in the project needs to include node_ Modules
- [nginx] prefix removal in nginx proxy pass configuration
- Vue packaging error module build failed: typeerror: this getOptions is not a function
- Use of I18N in Vue