Ever thought about running Node on your phone using Linux?
1. Download and install Termux
Termux is a Linux emulator. Open source, and run without root, work on Android terminal, support APT management software package, perfect support nodeJS.
Website: termux.com/
The interface that opens up looks something like this
2. Install nodejs
Termux comes with a package manager, apt, which is usually installed using the apt command.
apt update && apt upgrade
apt install nodejs
Copy the code
Check the Node version number after the installation is successful
3. Install a text editor
Text editor, you can choose vim or nano directly
apt install nano
Copy the code
4. Git pulls remote projects
5. Create the project locally and start it
Here is an example of creating a vUE project, using vite to build NPM init. vitejs/app
performnpm insall
Install project dependencies, which may be a bit slow (57 seconds) due to using the NPM default source
After the NPM run dev command is executed, the project is successfully started locally at http://localhost:3000
6. Browser access projects
Open your mobile browser and enter your address in the address bar
Ok, you’re done!
7. View and edit files using Nano
Run Nano app.vue to see the code for the previous page
Write in the last
If you think it is good, your likes and comments are the biggest motivation for me to move forward.
Follow Dearhuan and reply to “Fund Push” to get “Using Node.js for scheduled tasks & email push”.