DEV Community

Cover image for How to run nodejs on android tablet using termux (full guide)
Mohammad
Mohammad

Posted on

How to run nodejs on android tablet using termux (full guide)

to run nodejs server on android tablet you need to download termux, then run

the first issue how to install and setup nodejs environment

step 1

pkg update && pkg upgrade
Enter fullscreen mode Exit fullscreen mode

step 2

pkg install nodejs && pkg install git
Enter fullscreen mode Exit fullscreen mode

or

apt install nodejs && apt install git
Enter fullscreen mode Exit fullscreen mode

the second issue how to create folder and edit files in it

in termux write

first cd the default folder in termux

cd ~
Enter fullscreen mode Exit fullscreen mode

make directory

mkdir react-on-android
Enter fullscreen mode Exit fullscreen mode

Image description

clone project

git clone %url%
Enter fullscreen mode Exit fullscreen mode

install packages

npm i
Enter fullscreen mode Exit fullscreen mode

start server

npm run start
Enter fullscreen mode Exit fullscreen mode

Or create new project

initialize npm project

npm init
Enter fullscreen mode Exit fullscreen mode

install npm package (react)

npm install react
Enter fullscreen mode Exit fullscreen mode

create new project

npx create-react-app my-app-name
Enter fullscreen mode Exit fullscreen mode

to run server

npm run start
Enter fullscreen mode Exit fullscreen mode

how to open project in code editor

am using acode

Image description

Add path

Image description

Select folder

Image description

Image description

Select termux

Image description

Image description

Top comments (0)