Representational state transfer (REST) is an architectural pattern that guides an Application programming interface(API) design and development. RE...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
I am a nodejs developer and I was assigned to make one rest API in go. I came across this article tutorial and this was the best tutorial to implement a REST API with all the CRUD operations in go. Loved it, Keep growing! <3
Thanks for the kind words.
Glad the article helped :)
good work
Extremelly helpful for those who are starting with GO. Congratulations! Keep it that way
Thanks sir, go is best for Web api's
Hi ,
Thank you for sharing.
Could I ask you more question ?
I am trying to deploy it on Heroku.
But it shows :
github.com/{myname}/fiber-mongo-api/configs
! Push rejected, failed to compile Go app.
! Push failed
What should I do to make it able to run on Heroku server?
Hi,
I'm glad you enjoyed reading the article.
I haven’t deployed on Heroku before.
These resources might help
devcenter.heroku.com/articles/gett...
dev.to/heavykenny/how-to-deploy-a-...
when i follow this doc and implemented it run succesfully again when i close my pc and run again
its showing
main.go:6:5: cannot find package "github.com/gofiber/fiber/v2" in any of:
C:\Program Files\Go\src\github.com\gofiber\fiber\v2 (from $GOROOT)
C:\Users\Techolution\go\src\github.com\gofiber\fiber\v2 (from $GOPATH)
it is happening again and again i tried to build and run it run succesfully when i tried to close my pc and run again its showing same
Hi @surajtecho
According to the error, It looks like the
fiber
package is not installed.try reinstalling the package using: "go get -u github.com/gofiber/fiber/v2"
why using a dedicated file for every response type ?
maybe putting all the responses types in one file would be better
Very good stuff
thank you very much i will use on production.
This way of coding is absolutely NOT how go is meant to be used. You are supposed to convert your functions in methods and implement interfaces in your packages.
I am struggling to create a dockerfile for this project. Please help me create one
Did you manage to figure this out?
Hi,
You create new user ID with primitive.NewObjectID().
What if two requests are executed at the same time (concurrency case)
Has anyone gotten a status 400, unprocessible entity on post requests and resolved it?