AdonisJS: On the PowerMac… Huh?
Hey hey :). My time at university has FINALLY (somewhat) come to an end, and I have more time to myself! I’m a mild tech-head, enthusiast, and make small things in my own time…
Really… In this case it’s two stories in one… Saves me writing a separate story for each I guess. Right, more to the point though I am a lover of tech, especially old tech. A few years ago (about 2012/13) I came across Apple’s PowerMac PC Ranges. I stumbled across the G4 which to me has such a unique design which I had got for free from a local resident in my town (yes, really…).
I was so happy to have one back then. It had OSX Leopard (10.5.8), the final version to which PowerPC was supported on as 10.6 was Intel-based onwards. But there was a problem… Nowadays many apps are incompatible with these machines due to only supporting Intel-based macs. It’s a shame really, but newer and better things come out don’t they… Baring this in mind, I was not going to just give up that easily. “Oh hell no”.
Getting a new PowerMac. What is it to do with AdonisJS exactly?
A few months later I sold on my G4 to an owner of many G4’s and G3’s so I knew it was in safe hands. I had enjoyed the time I spent using it and familiarising myself with PowerPC. Recently, I made up my mind to buy another one, and I have now done so. I now have a PowerMac G5, which is 64-bit instead of 32-bit, with a Dual 2.0Ghz processor, and a stunning design which I fell in love with. I see many carrying out mods such as custom motherboards but I like things to be original. So the question is… How does AdonisJS fit into this? I shall explain. I have set myself a challenge. I am building a small project called Fibermouse at the moment and have decided to challenge myself by carrying out most of if not all the development using only my G5 and a tiny hint of my HP EliteBook 8470P.
So what are you getting at, Mouse?
I previously wrote an article on this NodeJS framework, to which I enjoy greatly. The question is: Could AdonisJS run on my PowerMac G5 as well as NodeJS, MySQL and PHP?
The answer to this question: YES IT CAN, but with a twist or two.
When I acquired my G5 I set about finding out what I would be able to put on it. Luckily there are some individuals who are dedicated to keeping the PowerPC alive and kicking, so I was able to install certain apps like TenFourFox (Mozilla Firefox port), Microsoft Office 2008 for Mac, Virtual PC 7 for Mac (Slow as hell!), and iWork09. I also heard that Adobe’s CS4 Master Suite can be installed but I have yet to try this… But I couldn’t install things like NodeJS, MySQL and PHP onto OSX due to how old it was and the fact it was PowerPC and not Intel… I then found out however that there were PowerPC versions of some Linux/Unix flavours (see where I am going with this…). Just what I had been looking for. Next step was to find out which ones would work on my G5:
- Lubuntu Xenial Xerus 16.04 Desktop (The current one I am using).
- Ubuntu Yaketty Yak 16.10 Server (Haven’t tried it yet…)
- Debian Jessie 8.8 (Not yet tried, update released just over a week ago).
I also heard that some versions of FreeBSD are also compatible with the G5 too. As you can see, these are relatively recent Linux editions so there was hope after all.
I currently have 2 HDD’s in my G5. One Solid State Drive (a SanDisk 32GB), and a normal mechanical Western Digital one, both SATA. One slight drawback is that it uses the SATA-I revision, but to be honest it’s still quite responsive anyway so it doesn’t bother me… One drive has my OSX partition, the other with the Lubuntu partition.
UPDATE: I can confirm that I have successfully installed some of the Adobe CS4 Master Collection on my G5 (on OSX Leopard). Only installed the ones I need though: Dreamweaver, InDesign, Illustrator, and Photoshop CS4.
Doing stuff on the G5.
I was able to install and use the following quite comfortably on Lubuntu:
- NodeJS and Node Package Manager (version 4 and 5 via NVM).
- MySQL Server
- PHP version 7.0 with the necessary extras.
- Composer (along with Laravel 5.4 using the command).
- Git/Git Core.
- AdonisJS via the usual NPM command:
sudo npm install -g adonis-cli
- and PM2 (a popular process manager).
It’s important to note that AdonisJS expects NPM to be version 3.0.0 or above so I normally switch to NodeJS 5 (with NVM). This stuff isn’t available for OSX, however I think I have found another use… I downloaded the last version of xcode (3.1.4) that had PowerPC support. I have yet to explore it and see what it can do. May even build a couple programs or something. I even managed to find a customised webkit for leopard so I can use modern sites on Safari too. Back on Lubuntu I have managed to install PHP and MySQL server so I can execute my small old-ish Laravel projects.
Was I able to create a new AdonisJS project normally?
Yup, no problems there. Just did the normal command:
adonis new "yourprojectname"
So how do I edit my AdonisJS projects then?
Well I found a way to get round this… I use Brackets. But it’s not compatible with PowerPC is it? “Not as far as I am aware…”. I use an NPM package called Brackets server, which is a web version of the editor which can be accessed through any modern browser (in my case, Mozilla Firefox). Slightly out of date though but it still does the job nicely ;). That’s one of my trade secrets haha. I also do this for the Laravel ones too. I was thinking of customising this NPM package at some point…
What about ‘ace’, the ‘php artisan’ equivalent?
Yup, that too… As it’s NodeJS 5 I have to utilise the harmony proxies tag like so:
node --harmony_proxies ace
So now you know.
I can run NodeJS, as well as create and run AdonisJS apps (with a little tweak here and there) on my PowerMac G5! So if you have one of these machines knocking about it’s worth a shot. I’m due to experiment more with the OSX side and see what the outcome is. More stories to come soon.
Fibermouse (my project…) is now up and running and are looking for new people to come and join. I am hoping to offer AdonisJS setups to new customers in the coming months. I build and maintain this single-handedly and would love for you to come and visit.
If you like what I am doing, you can sprinkle some bitcoin on Keybase.io. I’m still building this project so any support would be greatly appreciated! I’ll be setting up my own Patreon page shortly.
Support AdonisJS on Patreon as well!
What a great framework. It’s certainly worth the support. Head along to the page on Patreon to show your support.
Cheerio from Mouse. Do give us a follow on Twitter.