I've used Termux (https://play.google.com/store/apps/details?id=com.termux) with a Bluetooth keyboard on my Nexus 6P to write a few nodeJS apps. I'd say it's about as good as writing code over SSH. All the important stuff works - serving on localhost, npm, git, etc. Actually, the most annoying thing about it is switching between windows.
As a bit of a bonus there's an extension app for Termux that gives you access to some phone features like SMS receiving and sending, the accelerometer and GPS. https://play.google.com/store/apps/details?id=com.termux.api