I installed Termux from the Play store. It's free and doesn't require root access. Sorry but if you have an iPhone, go fish.
The first thing I always do is check for updates by running these commands. If you have been away from your terminal for a while, it's good to run them again.
apt update apt upgrade
To extended the keyboard to give you options to keys like
TAB, etc. Swipe from left to right to open the Termux menu and long press on the
git. I know for sure I'll need these.
apt install nodejs curl git
Install your favorite editor. vi is already installed, but I like nano.
pkg install nano
I had to fix npm so that I could install packages globally.
I always create a dev directory to keep all my projects.
mkdir dev cd dev
Let's fire up an example Express app to see if this thing will go.
git clone https://github.com/joelnet/MojiScript.git cd MojiScript/examples/express-static-files npm ci npm start
Okay, it says it's listening on port
3000, but I have been lied to before.
Awesome! Looks like it really works!
I could get
n to install, but it didn't have access to
/usr directory and fails. This wasn't important to me at this moment, so I didn't dig into a fix. Maybe if you know you can let me know in the comments.
Not all packages are compatible. So this isn't going to be replacing my dev machine any time soon. But it's nice to be able to tinker on the go.
I was able to get node and express up and running on my Android phone using Termux. The setup is pretty fast and straight forward. I was actually surprised at how easy this was.
Where should I take this next? Let me know what you would do with this setup in the comments!
I did get WarriorJS up and running too!