Suggestion for anyone creating a database, always, ALWAYS keep your timestamp fields at the start of the table's column definitions, after the ID field, e.g. id, created_at, updated_at, (deleted_at if using soft deletes). The reason for this is the data is cleaner, because if you ever add additional columns to the table, these meta fields will appear in the middle of your table, and looks quite messy whenever doing select *. ORM's can mitigate this, but it's good practice, especially when using Postgres as it does not support moving columns or specifying 'after' when creating. I guess I'm just a bit OCD, but that's a good thing in our line of work.
Great work @code_brew! This is what I was hoping to see from your first video :). I tried Bun very early after its release, but the ecosystem was a mess, and the lack of http routing was painful. This video gives me hope! I'm definitely gonna use this method on my next project. I especially appreciate the strong typing demonstration. Keep it up!
@@cdbrw Great news! I'd be interested in general concepts like project structure and things like advices on where to structure business logic, data fetching, validations and error handling
Noted ;) I am planning on making videos on React, Remix, HTMX and other frontend technologies. Will keep those ideas in mind when I plan those videos out 🙏
Hey CodeBrew, great video, man! You explained it in a very simple and easily understandable way. Why don't you create a full-stack, production-ready project using Bun and Elysia for the backend, and Next.js for the frontend? Also, could you please share the best production-ready practices we should follow for an API?
thanks for sharing, i was read and watch ur tutorial. and i try to connect with my nextjs project, its work but i dont know how to implement Eden as end to end type safe. can u make some artcile about it?
for sure, was actually planning on making a video on my switch from docker desktop to orbstack and the benefits I’ve gotten out of it. I’ve already written an article on this on Medium if you’re interested in reading a bit about it before I get to the video
Whats the usecase here? To catch the error and return it as a json response? How would you handle that? Would you still return an appropriate http code?
Bun's biggest promise is being significantly faster than the other runtimes when it comes to certain tasks. Elysia pairs really well with it as it's designed specifically for Bun
Suggestion for anyone creating a database, always, ALWAYS keep your timestamp fields at the start of the table's column definitions, after the ID field, e.g. id, created_at, updated_at, (deleted_at if using soft deletes). The reason for this is the data is cleaner, because if you ever add additional columns to the table, these meta fields will appear in the middle of your table, and looks quite messy whenever doing select *. ORM's can mitigate this, but it's good practice, especially when using Postgres as it does not support moving columns or specifying 'after' when creating. I guess I'm just a bit OCD, but that's a good thing in our line of work.
thanks, as someone who has OCD this helped me to pay attention to unnecessary details and feed my OCD and get worst overtime.
@@arshiagholami7611happy for you dear js developer
Good idea
thanks man
You can always back up the table and reinsert with the new column without having to paste timestamps in the beginning.
Great work @code_brew! This is what I was hoping to see from your first video :). I tried Bun very early after its release, but the ecosystem was a mess, and the lack of http routing was painful. This video gives me hope! I'm definitely gonna use this method on my next project. I especially appreciate the strong typing demonstration. Keep it up!
Bro reading my mind,
I had questions in my head and every time one popped, this absolute chad replied a second later
I love you
I'm a Frontend dev but I've enjoyed this great video thanks a lot and keep up the good work 🙏. Subscribed!
Thanks, welcome! 🙌 I do have some frontend content on the way so stay tuned for that 😉 anything in particular youd like to see covered?
@@cdbrw Great news! I'd be interested in general concepts like project structure and things like advices on where to structure business logic, data fetching, validations and error handling
Noted ;) I am planning on making videos on React, Remix, HTMX and other frontend technologies. Will keep those ideas in mind when I plan those videos out 🙏
Great tutorial with Bun with Elysia & Prisma. Props to @code_brew
its was my first touch on bun. thank you for nice tuto!
glad you found it useful! 😄
Hey CodeBrew, great video, man! You explained it in a very simple and easily understandable way. Why don't you create a full-stack, production-ready project using Bun and Elysia for the backend, and Next.js for the frontend? Also, could you please share the best production-ready practices we should follow for an API?
Oh these are some great ideas, thanks! 🙏 I do plan on releasing a video on how to deploy this soon but I'll see how I can include those points aswell
Very good video. Looking forward towards deployment process.
Subscribe and hope this video reach many more people.
Thanks so much and welcome welcome 🙌
check out the video I just uploaded for the deploy process 👀
th-cam.com/video/fZyAx97hzfw/w-d-xo.html
nicely put! curious, Which IDE you are using?
was using webstorm in this video 🫡
thanks for sharing, i was read and watch ur tutorial. and i try to connect with my nextjs project, its work but i dont know how to implement Eden as end to end type safe. can u make some artcile about it?
Ooou that’s a good idea 👀 I’ll take a look into it and see when I have some time to. Thanks for the support btw!
Subscribed ✨
welcome welcome! 🙌
@@cdbrw can you please create a video on your docker, and your docker setup. That would be so helpful.
for sure, was actually planning on making a video on my switch from docker desktop to orbstack and the benefits I’ve gotten out of it. I’ve already written an article on this on Medium if you’re interested in reading a bit about it before I get to the video
is there a way to create a middleware that translates prisma errors to json payloads?
Whats the usecase here? To catch the error and return it as a json response? How would you handle that? Would you still return an appropriate http code?
Cool tutorial, except one thing: Prisma has huge overhead and very high latency of queries, that's why I use Drizzle instead
I have a separate video where I check out Drizzle and setting it up 😉
th-cam.com/video/Eljdg5_EgOI/w-d-xo.html
Would you like to share your extension to make UI looks like that?
Which UI? My code editor?
@@cdbrw yes yes
it’s called webstorm
What webstorm theme?
Neo Night
what is the ide u r using?
webstorm
Subscribed!!!
welcome!! 😄
how/where do you deploy bun?
hey, I will be releasing a video on this so keep an eye out for it in the coming weeks 👀
Anything that can run Docker containers can run Bun
check out the video I just uploaded for the deploy process 👀
th-cam.com/video/fZyAx97hzfw/w-d-xo.html
another framework? Why????????????????????????????????????????????????????????????????????????????????????????????????????????????
Bun's biggest promise is being significantly faster than the other runtimes when it comes to certain tasks. Elysia pairs really well with it as it's designed specifically for Bun
I got baffled that after googling it upsertMany is still a WIP in prisma jezz
a better way to parallelize would be Promise.allSettled at least but it's just a script lol