How to run java script Language node.js on command line Andoid termux [Also work for non-rooted Devices]
What Will I Learn?
- How to install nodemon in Termux
- How to setup nodemon in Termux
- How to create a javascript file and where to save it
- How to run the .js file in Termux using commands
Requirements
- Termux :
Download Link - Dory - node.js / javascript APK :
Download Link - Amaze File Manager : Download Link
Difficulty
- Intermediate
Procedure
How to install & setup nodemon in Termux
- 1: Open the Termux app and type command
pkg update && pkg upgrade && pkg install python2
and press Enter.
2: Now type command
apt install coreutils
and press Enter, wait until it complete its process.
3: Now type command
termux-setup-storage
and press Enter, then if a popup comes, click on "Allow".4: Now go to a directory by typing command
cd storage/shared/Android/data/com.termux/files
and press Enter
- 6: Now open this directory by type the command
cd nodejstuts
- Now type command
npm install -g nodemon
and press Enter, make sure you have a good internet connection and received the same msg at the end of installation as shown in this screenshot.
- Message at the End of Installation
How to create a server.js file.
- This is a Testing Example. You can create any file with javascript if you are expert in JavaScript.
- 1: First Run the Amaze file manager and create a file named server.js in directory storage>emulated>Android>data>com.termux>files>nodejstuts
- Create a new file named server.js (You can choose any name with .js extension, after that you run it with that name)
- In my case, i named it server.js
3: Select you last created the file by going to same directory Android>data>com.termux>file>nodejstuts and select the file server.js You can also follow these screenshots
open data
- click on server.js
Curriculum
How to setup and run python and C++ in Android Termux
Tutorial 2: How to make a call and send SMS using Android Termux
Tutorial 3: How to install SQLmap in Android Termux [Also work for non-rooted devices]
Tutorial 4: How to Trace exact IP Location on Android Termux [Also work for non-rooted devices]
Posted on Utopian.io - Rewarding Open Source Contributors
Your contribution cannot be approved because it does not follow the Utopian Rules.
You can contact us on Discord.
[utopian-moderator]
Hey @creon, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Good job my fri...