Our great sponsors
-
fasthttp
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
postman-app-support
Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
In this article, you’ll learn how to build microservices in Go using a package called Fiber, a Go framework that is inspired by the Node.js Express framework. It is built on top of the Fast HTTP package, known for being the fastest HTTP engine for Go.
Fiber is fast and resembles the Node.js express framework, making it easier for a Node.js developer to transition to using Go. The complete code discussed in this article can be found in this repo.
Fiber is fast and resembles the Node.js express framework, making it easier for a Node.js developer to transition to using Go. The complete code discussed in this article can be found in this repo.
Now, we’re ready! If you run the main.go file from the terminal using go run main.go, it will start the server at your localhost port 3000. You can now test it using Postman or any API client you prefer.
In this article, you’ll learn how to build microservices in Go using a package called Fiber, a Go framework that is inspired by the Node.js Express framework. It is built on top of the Fast HTTP package, known for being the fastest HTTP engine for Go.
Fiber is a web framework heavily inspired by Express. If you are coming from Node.js, Python, or Ruby, you'll find Fiber extremely easy to get started with. Go is fast, low on memory footprint, and highly performant, meaning it also makes the Fiber framework fast.