Bun Crash Course | JavaScript Runtime, Bundler & Transpiler

Bun Crash Course | JavaScript Runtime, Bundler & Transpiler

Traversy Media

9 месяцев назад

66,166 Просмотров

In this crash course, we will look at the Bun.js JavaScript runtime/bundler/toolkit. I will show you how to get set up and check out some of the features.

Bun Official Website & Docs:
https://bun.sh

Check Out My Courses:
https://traversymedia.com

If you are on Windows, this is a video I did setting up WSL. It is old, but the steps are pretty much the same:
https://www.youtube.com/watch?v=Cvrqmq9A3tA

Timestamps:

0:00 - Intro & Slides
1:22 - What Is Bun?
4:41 - Features & Advantages
9:16 - Installation
11:50 - bun init
12:55 - bun run
13:18 - Bun.serve()
15:29 - Watch Mode
16:22 - Hot Reload Mode
16:43 - Env Variables
18:16 - Bun Scripts
19:30 - Simple Routes
21:00 - bun x
21:58 - Node Core Modules
23:59 - File I/O API
27:05 - Testing
29:19 - The Bundler
32:21 - bun build
34:26 - Bundler Watch Mode
35:03 - React & JSX
39:03 - Conclusion

Тэги:

#bun #bun.js #bun_js #bun_tutorial
Ссылки и html тэги не поддерживаются


Комментарии:

@jayparekh2592
@jayparekh2592 - 31.10.2023 19:46

Your proshop 2.0 is just wow....

Ответить
@kimboender7749
@kimboender7749 - 29.10.2023 09:58

Nice one again!

Ответить
@fabrice9848
@fabrice9848 - 19.10.2023 11:14

Who uses Windoze in 2023? And WHY???

Ответить
@tonykharioki6913
@tonykharioki6913 - 19.10.2023 04:03

this was amazing. I now understand bun more intimately. good job Traversy

Ответить
@shrimpoffthebarbie
@shrimpoffthebarbie - 17.10.2023 21:52

How does this help me? I don't work on web.

Ответить
@FujiLivz
@FujiLivz - 15.10.2023 01:03

Liked the vid so much I subscribed, great breakdown for a quick crash course!

Ответить
@TheBlackmanIsGod
@TheBlackmanIsGod - 10.10.2023 02:14

Why are my Bun files hidden? How do I get the files to my web server?? When I use GUI and navigate to the folder or directory there’s nothing there, I can’t see any files, but when I navigate there in command line then I see all my .tsx, and beginning files…

Why can’t I see my files so I can copy them over to my web server or how do I do this??

Ответить
@UCHIHA587
@UCHIHA587 - 03.10.2023 10:03

We want Ether.js crash course

Ответить
@pokeyanteater598
@pokeyanteater598 - 02.10.2023 17:32

This was pretty sweet

Ответить
@MuhammadBilal-ry5rb
@MuhammadBilal-ry5rb - 30.09.2023 12:05

I'm following Brad from last 2 years I believe he is one of the best Programming Instructor in the world and quality content I just love your teaching way that your primarily focused on quality content even less effort of editing that's really love and huge respect and love from PAKISTAN.
God bless you Brad, you are inspiration for us.
Thank you for your quality content :-)

Ответить
@sakarsr
@sakarsr - 28.09.2023 16:43

Thank you for this Bun crash course. Is Bun ready to be used in real development?

Ответить
@dezlymac
@dezlymac - 27.09.2023 02:58

Thanks for this crash course Brad!
👀 I was about to start learning node (I still will learn node) but I couldn't resist checking out the bun hype. So tasty lol

Ответить
@jakobgarde6769
@jakobgarde6769 - 26.09.2023 21:30

Thanks for the video! It is probably the best video on Bun as of now 😎
I noticed that you chose to disable Copilot by going into your plugin/extension tab in VS Code. But do you know that you can disable it by simply pressing on the little Copilot icon in the lower right corner of the editor? That is just way easier in my opinion 😅

Ответить
@Boylagak
@Boylagak - 25.09.2023 23:45

Sir more tutorial about PHP Programming language please!

Ответить
@howuseehim
@howuseehim - 25.09.2023 09:34

Are we getting a php course with building custom MVC templating with twig and all the good stuff?

Ответить
@kameikojirou
@kameikojirou - 25.09.2023 08:16

Awesome, thanks for this!

Ответить
@bhanuarora4504
@bhanuarora4504 - 23.09.2023 13:45

i used watch mode for bun on wsl and it's not working, any facing similar issues or do you guys have any fix for the same??

Ответить
@husseinkizz
@husseinkizz - 22.09.2023 20:49

This is it, the great has made a video on it 🧙‍♂️

Ответить
@zb3485
@zb3485 - 22.09.2023 19:57

the benchmarks arent lying...im yet to find a case/project where performance wouldnt be improved AT LEAST 2x

Ответить
@IsxaaqAcademy
@IsxaaqAcademy - 22.09.2023 10:13

Thank you sir

Ответить
@nordicnomad5473
@nordicnomad5473 - 21.09.2023 23:51

Thank you so much for this video. I was looking for a tutorial for how to use bun as a development server. My node/npm is broken in my machine and I wanted to try bun. Now I have the clear guidance on how to use it. Thabks again 🎉

Ответить
@stevemcardle2013
@stevemcardle2013 - 21.09.2023 11:05

Wold be great to see you do a crash course on htmx

Ответить
@furkangonulal1355
@furkangonulal1355 - 21.09.2023 08:15

I love how you did say several times " dear windows users, you do need to use the windows subsytem for linux "

Ответить
@viralmoney8619
@viralmoney8619 - 21.09.2023 06:15

Sir. Please make project playlists for nestjs❤🎉

Ответить
@algoexpert
@algoexpert - 20.09.2023 12:38

I have been trying all these performance benchmarks and seeing if bun really crashes node and node is faster; what am I doing wrong. Node also have --watch option to correct this video a bit. What is the point of bun then installation?

Ответить
@CodingPhase
@CodingPhase - 19.09.2023 21:17

great crash course

Ответить
@mdadnankhan666
@mdadnankhan666 - 19.09.2023 18:23

Thanks Brad, for this crash course!! I am waiting for your full course on bun on Udemy 🙂!!

Ответить
@cbbcbb6803
@cbbcbb6803 - 19.09.2023 18:07

Do we need to learn Zig as well?

Ответить
@dainsleif3122
@dainsleif3122 - 19.09.2023 15:36

Question: Why would you use this instead of Next.js ?

Ответить
@mkfelipevideos
@mkfelipevideos - 19.09.2023 14:05

Nice explained! One question. Do I need to uninstall Node in order to install and run Bun?

Ответить
@mohamedsakr9301
@mohamedsakr9301 - 19.09.2023 13:50

Thanks Brad for creating and sharing this awesome crash course
do you plan to mojo crash course ?

Ответить
@judevector
@judevector - 19.09.2023 13:43

Just finished going through this now , thank you for making this I now have a grasp of what I can do and how bun works

Ответить
@zouhairsahtout9682
@zouhairsahtout9682 - 19.09.2023 13:09

I learned HTML and CSS JavaScript in the past and now I want to move to the backend but I dunno what should I learn Nodejs or Bunjs, my plan was to start Nodejs.
What do you think guys

Ответить
@muhammedozalp
@muhammedozalp - 19.09.2023 12:59

Thank you bro for this great tut

Ответить
@AindriuMacGiollaEoin
@AindriuMacGiollaEoin - 19.09.2023 11:26

Super exciting! Great course Brad :)

Ответить
@bugraotken
@bugraotken - 19.09.2023 11:00

Hello Brad, thank you for this quick tutorial but it would way better if you have get rid of these type warnings at the code. Everywhere is underlined red =/ I mean, we can not use "document" like you do at coding side. (src/index.tsx)

Ответить
@treyrader
@treyrader - 19.09.2023 10:13

yes!!

Ответить
@horizondevmain
@horizondevmain - 19.09.2023 09:48

Incredible performance 💖💖

Ответить
@regilearn2138
@regilearn2138 - 19.09.2023 09:20

Please do REACT HOOK FORM course.

Ответить
@DotcomL
@DotcomL - 19.09.2023 09:16

As a C++ dev... I'm pure jealousy

Ответить
@snithfferx
@snithfferx - 19.09.2023 08:53

Thanks for the video.
Was very explainatory and easy to follow.
just a question, is something I try to figured it out.
Did you make it work with routes, but using a separate file of routes?
I had have try to make it as node.js and express but without express is not possible.

Ответить
@Sebastian-hg3xc
@Sebastian-hg3xc - 19.09.2023 08:33

careful not to fall victim to the hype. i've seen a review with performance tests that showed bun being actually slower than pure nodejs. what is fast is mostly their package manager.

Ответить
@clixt984
@clixt984 - 19.09.2023 05:17

I was just waiting for Brad's take on Bun! Time to watch this video!

Ответить
@champorado2131
@champorado2131 - 19.09.2023 03:20

I have been waiting for your own take on Bun!

Ответить
@soniablanche5672
@soniablanche5672 - 19.09.2023 03:10

Bun seem to have problems with regex, they are really slow compared to node.

By the way, you don't need nodemon for node anymore. node has a watch mode too.

Ответить
@AaronStorey
@AaronStorey - 19.09.2023 01:12

Im a native Android developer, but I'm looking to expand my horizons. Looks like now is a more exciting time to check out web development 🤔

Ответить
@noherczeg
@noherczeg - 19.09.2023 00:39

Please don't import React as default export, it's totally unnecessary since version 17.

Ответить