Frontend Development On A Budget: Raspberry Pi 4

Thanks to Harrison Broadbent @harrisonbroadbent for making this photo available freely on Unsplash 🎁

I’ve put my developer experience to the test with a Raspberry Pi 4 with only 2GB of RAM. 🙈

Last years I’m spoiled by using mainly powerfull Apple Macbook Pros for work. They can handle everything with ease.

But I realise that not everyone has that luxury to buy a Macbook Pro or another powerful Windows computer.

That’s why I wanted to experience myself how it is for people to build a Frontend application with Angular on a Raspberry Pi 4.

Here is what I learned from it.

Raspberry Pi OS

The default Linux distro Raspberry Pi OS which is offered by the Raspberry Foundation works like a charm on a lightweight computer. The desktop version is easy to install and get started.

The difficult thing is only, you need another computer to install the system on a micro SD card. But you can also order one already installed if you like.

If you’re not used to a terminal it’s not a big problem. But I advice you to get used to that. Almost all the software on Linux has to be installed via the terminal.

It needs cooling!

When you start installing software on your RBpi, you will experience quite some heat from the plate. So it’s a good idea to get some sort of cooling from a fan.

My friend Harmen printed a custom case on his 3D printer so I can attach a cool fan to it. I know, these colors POP right 🙃

Visual Studio Code 🤔

I love working with Visual Studio Code! It’s such an easy but powerful code editor you should give a try!

But if you want to use it on a Raspberry Pi, you don’t have an easy installer to get it running. Since a few days I discovered that the September update of VScode is supporting ARM architecture like the Raspberry Pi 🙌

So it’s totally possible to use it. But after using it for a while, you see that a computer like this lacks the power you need.

in my opinion it would be a better bet to use CodeSandbox or one of the other alternatives.

Terminal

The terminal on the Raspberry Pi is like many other Linux machines, it’s just good!

But one weird thing in my opinion is you can’t paste via CTRL+V but have to do that via clicking with the right mouse button 😢

NodeJS

How about NodeJS? Well installing NodeJS on both Linux as MacOS is recommended to use NVM. NVM makes it easy to update to newer versions by a single command nvm install v14 so no hassle with that.

When you install NodeJS, you will see that It will need a special ARM version of NodeJS. Luckily NVM handles this automatically.

Angular CLI

Installing the Angular CLI is no problem at all. But if you compare it to a powerful Mac or Windows computer you will notice that it takes a lot more time to get all the Node packages.

When you have an existing Angular project or creating a new Angular project, you will definitly discover that you need a lot more patient. Especially when you run npm start because it takes some time to compile all the TypeScript files to a bundle to serve in your browser.

Browser

If you use the default browser of the Raspberry Pi Chromium I guess you find 100% similarities with Chrome on other computers.

But when I’m in the process of building a tutorial. So writing code and writing that process in a text document in the browser, I discovered quite some times that my browser tabs will crash.

I guess it’s because of the limitations of 2GB of RAM.

Conclusion

In the end, doing frontend developement on a Raspberry Pi 4 with 2GB of RAM is douable on the bare minimum. Rephrase your expectations before you start because you need to be patient.

But if you don’t have to money for a Mac or Windows computer, and this is all you can buy, I think it’s better than nothing. For about 40$ you can order one, and if you have about 60$ — 80$ you can even get one with 4GB or 8GB of RAM. If you can spend that money, you should do that.

Building an Angular or other Frontend application on a Raspberry Pi is not ideal. I would prefer to use CodeSandbox to develop these kind of application. Because you can run it in the browser and all the compilations are running on the powerful servers.

If you are used to a powerfull mac and try to switch to the Raspberry Pi 4 you will find out that you are used to a lot of convienience. Jeff Geerling has a great video on Youtube where he shows everything he found out.

I hope that my post will give some people a good idea of what it is to use a Raspberry Pi as the main programming computer.

If you have additional tips for other people, please share them in the comments.

Happy Coding 🚀

Read more

5 Tips For Healthier Developers
_Your Body And Brains Need Attention_
medium.com

What Tech I Use in 2020 As Developer
_Software, Hardware and other stuff I use during my work_
medium.com

JavaScript Concepts You Need Before Starting w/ Frameworks & Libraries
_Don’t start before you are comfortable with them_
medium.com

TypeScript’s New Top-Level Await
_We don’t need an async function wrapper anymore_
medium.com

Did you find this article valuable?

Support Dev By RayRay by becoming a sponsor. Any amount is appreciated!