In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to carry out raspberry pie Nodejs actual combat to build Web service, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
The first way: traditional way, not recommended
1. Check the link address of ARMv7 download on http://nodejs.cn/download/
For example: https://npm.taobao.org/mirrors/node/v10.15.3/node-v10.15.3-linux-armv7l.tar.xz
2. Download:
Wget https://npm.taobao.org/mirrors/node/v10.15.3/node-v10.15.3-linux-armv7l.tar.xz
Xd-d node-v10.15.3-linux-armv7l.tar.xz
Tar-xvf node-v10.15.3-linux-armv7l.tar
3. Move the extracted directory to the specified location
Sudo mv node-v10.15.3-linux-armv7l.tar / usr/local/nodejs
4. Link
Sudo ln-s-f / usr/local/nodejs/bin/node / usr/local/bin
Sudo ln-s-f / usr/local/nodejs/bin/npm / usr/local/bin
5. Version testing
Node-v
Npm-v
The second way: use nvm, recommended
Nvm is a special tool for node.js installation and version switching. For more information, please see the relevant documentation, such as https://www.jianshu.com/p/d0e0935b150a.
1. Install nvm:
Curl-o-https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
Source / .bashrc
Check the version number: nvm-- version to determine whether the installation is successful
2. Install node.js:
Go to nodejs.org to find the latest recommended version. Currently: 10.15.3
Installation: nvm install v10.15.3
After installation, you can view the version via node-v and npm-v, which means that node and npm are installed successfully.
3. Install Express:
Npm install express-generator-g
After installation, you can view the help information through the command express-h, indicating that the installation was successful.
4. Create a project myapp:
Express myapp
Cd myapp
Npm install
Run: npm start
After reading the above, have you mastered how to build a Web service for raspberry pie Nodejs? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.