Deno is great

My tech stack upgrade journey - From Node.js To Deno

·

3 min read

Deno is great

Starting from Scratch

This website is created using cutting-edge technologies: Deno as the runtime, Deno Deploy as the hosting platform, Fresh web framework, and Supabase as the database, offering real-time features. Additionally, the website is powered by a lightweight and enjoyable game engine named Kaboom.js. It's important to note that none of these technologies I used before I built Denopark (a typing game for learning languages).

As an indie developer, it is quite risky to use a new tech stack when building a product. However, looking back now, it was a perfect decision.

Since the website went live, it has attracted over 10k registered users. During this time, it also encountered malicious registration attacks resulting in over 100,000 spam accounts. Despite these challenges, the website has continued to operate smoothly. In hindsight, the choice of these technologies has made my work more manageable and enjoyable.

Why Use New Stack

Because of their simplicity. When the first version was released for user testing, I only had to rely on Deno KV without the need for a traditional database. During development, I could kickstart everything with a single command deno task start. This meant no dealing with npm install, pm2 logs, or the hassle of setting up a database for testing and production environments.

There were no CI or GitHub action workflows to deal with either. I could instantly deploy the code with a simple git push. Fresh's server-side rendering took care of the SEO aspects, and Deno Deploy removed the headache of server maintenance. These conveniences brought immense satisfaction to a developer like me.

With the introduction of supabase, the project became somewhat complex. However, the allure of Supabase's database and real-time functionality was too strong to resist.

New tech stack brings great convenience so we need to overcome the friction they bring. I want to share the secret of using this stack, which is to abandon perfectionism.

Using New Stack in the Simplest Way

If your goal is to get the product online, solve problems immediately with foolish solutions. For example, how to implement multilingual support on a website. Mature frameworks may have standard answers, but I couldn't find them in Fresh. So, the simplest way is to write the different languages directly in HTML and choose the language based on a language variable.

<a>{["Edit", "编辑", "編集"][langIndex]}</a>

The above code is written all the HTML, but I can say that the effect is very good. It is convenient for me to modify, and AI can also assist me in modifying. More importantly, I don't have to wait for Fresh's i18n support because I have implemented it in my own way.

There are many different situations like this, and I have mostly implemented them in stupid but effective ways. This has allowed my tech stack to transition smoothly without too many difficulties.

Finally

I don't intend to promote Deno technology, even though my domain name contains "Deno". It's purely because I couldn't register the domain name "dinopark".

There may be better technical solutions, such as Bun, and Hono. But Deno and Fresh are worth trying, especially if you are still using Express to build websites.

Hope you enjoy your tech stack upgrade journey too.