Fast and Simple Web Apps with Nitro
Nitro is an exciting web server created by the unjs team, who are also the people behind Nuxt. Nitro is a study in simplicity and a wonderful tool for your JS belt.
I’ve been writing a fun book over the last few months on Nuxt 3 and it’s based on my experience building out bigmachine.io as well as the individual course sites I have. I’ve been using Nuxt for years and love it — and Nuxt 3 is particularly exciting because it’s both faster and simpler.
One of the things I wanted to dig into was the server that powers Nuxt: Nitro. Nuxt 3 behaves a bit differently than Nuxt 2, and I wanted to know why. Specifically:
- It’s faster. I know a lot of this has to do with Vite, but the server starts instantly.
- The routing is different. You used to use an
_
for the dynamic routes, now you use square braces[]
. - The serverside routes are ridiculously terse, which I absolutely love.
So I spent the last few nights and weekends digging in and had a ton of fun. The result was a quick 5 minute video for you to enjoy!
If you’re into terse simplicity, here you go…
Originally published at https://robconery.com on October 31, 2022.