I'll be heading over to the US soon for Cloud World.. and that means about 22 Hrs in the air with maybe some internet access. So I've been thinking.. I carry around with me a Laptop (MacbookPro), Android Phone and iPad Air on the flight - wouldn't it be great to just be able to develop on the pad without the need get out my larger laptop to create new cool things?.. So after a bit brainstorming looking what others are doing this is my plan to see if this will actually work..
The Tech / Hardware
I jumped onto eBay over the weekend and picked up:
- Apple Magic Keyboard 11" (eBay)(New)(£170)
For my iPad air4 - it retails for £279- so I got lucky.. but there are plenty of alternative aftermarket keyboards for less than £50
- New Mobile - OPPO Neo X3 (eBay)(Open Box) (£250)
I have a Samsung s9 about 4 years old - so it's about time I upgraded.
(It has been the best phone I've owned that I almost went for the S22.)
- Anker 521 Magnetic Battery (Amazon Warehouse)(£30)
I don't think I'll need the extra power but just encase..
Unfortunately I couldn't find anyway to run NodeJS locally on an unrooted iPad; and I really need a local dev platform not cloud as my connection is going to be choppy..
I did come across two possible initial solutions:
Yes there are others.. but these are the two I took sometime to look into if they could work for me.
- https://stackblitz.com/ are very close using webContainers too run nodeJS directly in a browser - unfortunately iOS & Safari team are a little behind - still this looks like a great IDE for iPad and web development.
- CodeSandbox(play.js) also looked like a potential option but again running NodeJS in the cloud.
With those options out of the way - I saw a lot of developers mentioning raspberry PI.. I have about 4 maybe 6 Pi paperweights right here not doing anything.. but then thought this is going to be a pain.. I'll need an enclosure.. battery, WIFI, screen, possible need to connect another keyboard at times... so this idea was shot right down.. I needed something more streamline with less chance of things to go wrong..
Raspberry Pi With iPad
But if you want to setup Pi with iPad check out this awesome video and setup guide - Broken into 2 parts.
Android with iPad
I don't want to really carry a Pi with me.. well you know what - I've got a powerful android phone.. You know what you can do with android phones... install Linux, setup a hotspot, it has power, keyboard, screen all in one place.
There are two options at this point..
Use Termux the Android terminal emulator and Linux environment app to install Linux.. or I could use Andronix - with Andronix you can also install their modified distributions optimised for android and it comes with VS Code/Server - So I could install this and then VNC from the iPad into the Linux GUI Desktop..
But wait I think this is the better option..
Use Termux to install Linux and then install VS Code Server on the phone! This means when I setup a hotspot I can launch iPad browser and connect to VSCode Server and launch VSCode in a browser.. No need to worry about glitchy slow connections and typing delays.. ..
To be fair I haven't tried it... maybe I wouldn't notice the lag with VNC but with this way - there should be no lag all the files stay on the Android and if I need to I can easily push them into github and pull them down to my laptop later.
Alternative to launching VS Code in a browser...
Yes, there is - I found this cool little app that is free: Servediter.
You can install it on your pad save and add your connection to your code-server instance and although it is running a browser - it has everything you need in one place with the additional capability of previewing your HTML pages on the app while editing!
Does it work??
I'll let you know in a new post - when I get back from Cloud World!