Here's how I do this:
https://stephendotz.com/posts/pocket-dev/ Originally I set it up on my iPhone, but now I use my iPad Pro "13 w/ the keyboard cover and it's really pleasant. I've written a ton of code on it. Front-end work is a little bit less fun because there aren't any browsers with dev tools for it.