I used to code NodeJS services on my phone quite a lot when I was commuting to an office. I used Termux - https://termux.dev/en/. It was brilliant, and worked far better than you'd think it would. The main problem was the keyboard because the stock Android one doesn't support a lot of symbols. I solved that with https://github.com/klausw/hackerskeyboard.