GoLang Fiber & MongoDB CRUD app (REST api) breakdown and deployment!
Today I am breaking down a simple REST API written in Go using Fiber that uses MongoDB. I breakdown how the code works and show how to deploy the app and database to Railway.
repo: https://github.com/bmdavis419/fiber-mongo-example
twitter: https://twitter.com/benjamin41902
insiderviz: https://www.insiderviz.com
timestamps
0:00 intro
1:02 app demo
2:03 db, env, and server
9:18 router and CRUD code
23:14 deployment
Thanks for the content, found one of your other videos & subbed! Just would like to say that I think there's more value for beginners to watch you code & hear/see your thought processes as you work. More importantly it's good for them to see how you track down errors when things go wrong. Github/gitlab/bitbucket are all full of pre-written code for people to analyze(which is a really good way to learn), but I think the real value of a video is seeing the whole process, not just the code after. Just my humble opinion reflecting back on my "just getting started days"…
This is a great tutorial, Ben! I am really impressed with Railway: I followed the steps you gave, created a simple Fiber app, posted it to github, and…bam! Everything was up and running in Railway in no time! Thanks so much for this great content! You deserve so many more subscribers! Keep up the great work!
Amazing video
Loving your content I have been tyring to build a small startup on the side. This is extremely helpful. Question for you do you use object storage at all or do you do all your writes into MongoDB?
I was interested in deploying to a test cloud hosting. What popular cloud hostings can you recommend for a modern deployment to production of a Golang + MongoDB application?
Your videos are awesome! I didn't saw this yet, but already smashed the like button. Thanks a lot!
Thanks for the video! Found lots dealing with SQL (mostly using GORM) but not so many with MongoDB.
As someone learning Go coming from Node, I really miss something like Mongoose where you can declare a schema explicitly in the MongoDB driver/ODM. Sure, we can user Go structs but I don't think it's as safe.