Skip to content
Swizec Teller - a geek with a hatswizec.com

If you can JavaScript, you can backend

When you think of a backend or server developer, who comes to mind? ๐Ÿค”

0pbndlpngi40j06

A wizard of arcane magics. The keeper of kingdoms. The holder of keys to Getting Data and Scaling Things and API Design and Modeling Domains.

They use weird technologies like Java and Go, wax poetic about Rust and never use it, cry and joke about kubernetes and docker. They write bash scripts that will make your eyes bleed.

After weeks in the configuration dungeon, only then shall you be allowed to write application logic

Serverless Handbook

Learn everything you need to dive into modern backend. Understand any backend

these chapters gave me knowledge which is sufficient to build real products and the hand-drawn diagrams and high-leveled descriptions gave me the feeling that i don't have any critical "knowledge gaps"

Launching soon, be the first to know.

Join over 10,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. โœŒ๏ธ

The modern backend is a JavaScript function

Towers of configuration are nice in a masochistic sort of way. Hard work rewarded by a brittle pile of jenga that keels over when you sneeze.

Perfection.

If the configuration dungeon is not your jam, here's what you can do instead:

export const handler = async () => {
return {
statusCode: 200,
body: "Hello ๐Ÿ‘‹",
};
};

Yep, that's backend code. A JavaScript function that runs in the cloud.

Providers like Netlify and Vercel call it a "cloud function", AWS likes the term "Lambda".

It is the whole backend. No routing code, no boilerplate, no fuss.

Runtime on demand

Deploy your function and you get a live URL like this https://z7pc0lqnw9.execute-api.us-east-1.amazonaws.com/dev/hello. Click that link and your platform handles the rest:

  1. API Gateway accepts the request
  2. Routes to the right server
  3. Server wakes up from the dead
  4. Runs your function
  5. API Gateway returns the response

Your server doesn't just wake up from the dead, your server comes into being on demand. A whole new machine configured just for you and your request.

Fast.

First request in days if not months
First request in days if not months

That's the first request in days if not months. Fraction of a second.

The Hello ๐Ÿ‘‹ lambda lives to serve as an example in my new book. You can try it and see that it's fast.

And yes, you can make it even faster. But then it isn't as free when nobody's clicking.

Infrastructure as code

The config for all this? 5 lines of code โœŒ๏ธ

Code is the key word. Specifics in a future email, but the code part is important.

With infrastructure as code your environment definitions live alongside your application code. Part of the same review process, the same version control, the same skills.

Write instructions in a file, deploys follow them perfectly. Every time. Computers are great at that ๐Ÿ˜‰

Better yet, you can make copies!

New engineer joins the team? yarn deploy and they get a full copy of your production environment to test with.

New pull request? GitHub Action and you get a full live copy of your environment for that piece of code. Test away.

Need to test 2 big features in parallel? Deploy twice from different branches. โœŒ๏ธ

It's dreamy.

What this means for the future

The future belongs to full-stack frontend engineers.

Folks like you my friend who use their existing skills to own whole features, build big products, and go where their code makes the biggest difference.

If you can JavaScript, you can backend.

Cheers,
~Swizec

PS: don't forget, I'm hosting a Serverless live Q&A on Monday

Did you enjoy this article?

Published on March 16th, 2021 in Serverless, Technical

Serverless Handbook launching soon

Leave your email and be among the first to know when Serverless Handbook launches.

The perfect resource that shows you how to jump into modern backend and understand any backend. A why and how book.

Serverless Handbook

Learn everything you need to dive into modern backend. Understand any backend

these chapters gave me knowledge which is sufficient to build real products and the hand-drawn diagrams and high-leveled descriptions gave me the feeling that i don't have any critical "knowledge gaps"

Launching soon, be the first to know.

Join over 10,000 engineers just like you already improving their careers with my letters, workshops, courses, and talks. โœŒ๏ธ

Have a burning question that you think I can answer?ย I don't have all of the answers, but I have some! Hit me up on twitter or book a 30min ama for in-depth help.

Ready to Stop copy pasting D3 examples and create data visualizations of your own? ย Learn how to build scalable dataviz components your whole team can understand with React for Data Visualization

Curious about Serverless and the modern backend? Check out Serverless Handbook, modern backend for the frontend engineer.

Ready to learn how it all fits together and build a modern webapp from scratch? Learn how to launch a webapp and make your first ๐Ÿ’ฐ on the side with ServerlessReact.Dev

Want to brush up on your modern JavaScript syntax?ย Check out my interactive cheatsheet: es6cheatsheet.com

By the way, just in case no one has told you it yet today: I love and appreciate you for who you areย โค๏ธ

Created bySwizecwith โค๏ธswizec.com