DEV Community

Ren Hiyama
Ren Hiyama

Posted on • Edited on

Ree-Imagine the REEST Server for Ree.js!

Ever Used Next.js? I am sure you did if you call yourself a ReactJS Developer! Well, the thing is... it still uses... ExpressJS in what..? 2022? Are we still meant to use such a slow framework in today's "fast" world?

Well, Let's dive straight into the benchmarks for Next.js (such a "battle-tested" framework for "Production" servers) and compare it with Reejs' server:

Next.js In Dev (because why not?)

Nextjs Dev

Next.js in Production (this should interest you!)

Nextjs Production

Fresh from Deno

Fresh

(Its like Ree.js but on Deno, btw Ree.js runs on Deno incase you don't know!)

Ree.js in Dev

Reejs Dev

console.log is a good bottleneck for the loggings :(

Ree.js in Production (Game-breaking mode activated I mean!)

Reejs Production

Gas Gas Gas, ReeJS is so freaking FAST!


So you might wonder why am I running Next.js in dev and even comparing it with Ree.js in dev?

My answer would be, why are we devs not thinking about DevX (Developer eXperience) and only focusing on UX (User Experience)?
Are all the devs in our world having a beefy PC to code on? I don't think so ๐Ÿฅฒ... And to backup my point, Let's go a month back...

Ever heard of Bun? Bun - The new Nodejs/Deno alternative that aims to be more fast. I give a huge round of applause for them to make something that will be faster, but my point brings to the github issue which still ranks #1 to this day on Google Search ๐Ÿ˜…

https://github.com/oven-sh/bun/issues/282

While Bun now provides builds that don't need AVX2 Requirement, we can see that issue that a lot of devs actually use a old pc to code on, and my PC is 11yrs old (Yet, I managed to run Windows 11 on my old pc with some optimizations to use 1.2gb ram on startup ๐Ÿ˜…) But you get the idea... Not everyone has access to latest resources!

So why we are devs acting as if we all have Beefy PCs? Just because "you" have doesn't mean everyone has it! (No hate to anyone btw)

My thoughts

We should really focus on DevX along with UX. I mean it's pretty much not bad... Both Reejs & Fresh doesn't build anything, so why are we still "building" in dev mode?


Oh sheesh...

Did you just realise I just moved the topic from one part to another? Ah my bad, shall we go back to the server topic?

Thanks to h3 for their awesome server framework that helps us reach newer limits! They (UnJS) currently have Nitro server (That's used In NuxtJS incase you wondered why do they have that lol) but the problem is Nitro server still requires you to build...

What Da Hail?

Meet REEST

Ree Server Takeover - Don't let the words deceive you!
This new upcoming server will be itself based on h3 server, provide all the features of Nitro server, without "building" because it's ree-ally not necessary to build!
But why the name "Takeover"? This takes over "your" problems and tries its best to fix it! You can now go and "take reest!"

Some Noticeable Features ๐ŸŽ

  • Host more servers on different ports that run their own service, and they run on different threads rather than on the main JS thread so it's more efficient ๐ŸŽฏ
  • Be as Fast as Serverless so you don't need serverless lol
  • Host on Serverless (Reejs currently can't run as SSR mode on serverless, you have to choose the static mode deployment and REEST shall work to fix that!)
  • Aim to be Beginner-Friendly ๐Ÿ˜Œ
  • Aim to be "Ree"-quality friendly (I mean how you scream "reeeeeee!!!" when your code doesn't work; Reejs can help you fix that, or scream "reeeeee!!!" on your behalf ๐Ÿ˜‰๐Ÿ‘)
  • Comment down below what else would you like to see!
  • REX-MODE Coming Soonโ„ข๏ธ! Spoiler Alert: you will love the way it handles the server efficiently! ๐Ÿ˜

Thanks for sticking around! ๐Ÿค

Come Talk with us, and help us shape the futuree of Reejs on our Discord Server at https://dscrdly.com/server !
Hit a star on our Github repo to show support ๐Ÿค— https://github.com/rovelstars/reejs

Making a new open-source "general" template project with Reejs? You may want to check out building on https://github.com/ree-js , Join our Discord server to notify us about it!

Have a "REE"-free Day! ๐Ÿ˜…

Example: You being in REE mode

I don't want to see you do this, that's why I made Reejs in the first place! ๐Ÿ˜‰

Top comments (8)

Collapse
 
moaoa profile image
moaoa

I have a question is it faster to import multiple urls than serving one bundle?

does importing alot of urls will cause lots of http requests?

Or am I missing something ๐Ÿค”

Collapse
 
renhiyama profile image
Ren Hiyama

the ?bundle parameter for esm.sh seems like a better option.
Yes a lot of urls will cause a lot of http requests, but mostly everything installs a lot faster than npm i. And most of the packages are pre-bundled for you, so you will see mostly 1-2 requests for every package you import.

Collapse
 
moaoa profile image
moaoa

Thank you for your explanation ๐Ÿ™
I think I need to read more about esbuild

Thread Thread
 
renhiyama profile image
Ren Hiyama

I fear you shouldn't read about esbuild...
Read this: esm.sh/

Thread Thread
 
moaoa profile image
moaoa

Thanks again I am frontend developer and i am considering to enter the world of open source.
Any repos that you recommend?

Thread Thread
 
renhiyama profile image
Ren Hiyama

I would suggest using reejs itself, at github.com/rovelstars/reejs
Alternatively, check out twind.dev and some other tools online like reactjs!

Collapse
 
decker67 profile image
decker

From Reejs

Wait, what? Import Urls? Yes! Ree.js supports import urls, something deno has being boasting about, while nodejs doesn't support it. This spares us from having to use npm install to install any library. Such a lifesaver! Example:

They are on the way.
https://fusebit.io/blog/nodejs-https-imports/?utm_source=duckduckgo.com&utm_medium=referral&utm_campaign=none

Collapse
 
renhiyama profile image
Ren Hiyama

Not on nodejs v16 though... Reejs is running url imports on nodejs v16. Most of the online services provide till nodejs v16, due to it being the current lts version. Good luck, and reejs doesnt use any experimental nodejs tag too, like --experimental-fetch or anything like that.