Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Build Servers with Bun and TypeScript
Highest Rated
Rating: 4.6 out of 5(15 ratings)
205 students

Build Servers with Bun and TypeScript

Learn to Build API Services Using Bun, TypeScript, Node and PrismaORM
Created byDavid Choi
Last updated 11/2024
English

What you'll learn

  • Learn how to create and setup new projects using Bun
  • Understand Bun's super easy module resolution system that can eliminate compatibility issues between CommonJS and ES6 modules
  • Understand Bun's built-in CLI that can do everything from running our app; to building our project; and installing our package dependencies
  • Review Bun's NodeJS API compatibility. We can now have a modern fast runtime without sacrificing compatibility with Node.
  • Learn how to create typed and validated Routes with Fastify and its Schema system
  • Understand how Fastify's Plugin and Scoping system work
  • Understand how to use Decorators and share state and functionality globally throughout the service
  • Understand how to use Hooks to get our code to run at the desired time
  • Understand how to handle errors that may happen in our Fastify routes
  • Understand database access and ORM using PrismaORM. Build a fully functional Repository layer using PrismaORM and Postgres
  • Build a Twitter clone API service using TypeScript, Fastify, PrismaORM and Postgres
  • Use Docker to deploy our service and get it ready for the cloud

Course content

3 sections15 lectures5h 13m total length
  • What Will We Learn?0:51

    Explore why bun is extremely fast and shockingly complete, with built-in environment access, node compatibility, and core installation features that boost developer productivity.

  • Package and Project Management8:02

    Install bun and initialize an empty project with bun init -y to set up a TypeScript ES6 module project with package.json and bun-managed dependencies.

  • Developer Tools4:43

    Explore bun developer tools, including npm-like dependency management, built-in env variables, fast installs, hot reload, and the bun vs code debugger for streamlined TypeScript development.

  • High Performance JavaScript Runtime7:22

    Explore bun's high performance runtime with near node api compatibility for file input and output and path operations, using async/await and fetch to access json placeholder data.

Requirements

  • This is an intermediate level course. You should know basic TypeScript and some server development

Description

Bun is a new high performance JavaScript runtime. It's combination of speed and capability is generating enormous attention in the JavaScript ecosystem.

In this course we will explore the major features of Bun and see how, together, these features provide a fun, fast and robust developer experience. We will use Bun to create a complete Twitter clone API using Bun, TypeScript, Fastify, PrismaORM, and Postgres. And deploy the service onto a Docker image.

The JavaScript ecosystem has been stagnant for a while now. Dependency hell. Slow project compilation. Seemingly random build errors. The need to spend huge amounts of time configuring and trouble shooting project issues. JavaScript fatigue has become a very real issue.

In this course we'll see that Bun is far more than just a fast runtime. Bun includes build tools that streamline the task of transpiling and bundling our apps. NPM package installations are lightening fast. Bun has an enormously powerful CLI, which is included out of the box. Creating and setting up new projects takes almost no effort at all. And on top of all this, Bun's capabilities also include NodeJS compatibility. So you can keep using most of your favorite frameworks and libraries and just focus on building your app. Bun is truly next level tech!

Who this course is for:

  • Developers new to BunJS that would like to get started building apps with the runtime