Since we are a team who loves to learn and explore new things, we are always on a look out to things that we think would benefit us. So, we decided to take a look into Go.
JS is a good language, but with numerous flaws. One of them is not being a statically typed language. What about TypeScript you must say? Yes, we do write all of our projects in TypeScript but it doesn’t always guarantee the type-correctness at runtime.
Interestingly enough, even Ryan Dahl, the creator of Node.js took interest in Go.
“If you’re building a server, I can’t imagine using anything other than Go” — Ryan Dahl, creator of Node.js
Then TJ Holowaychuk, the author of Express, migrated into Go in 2014.
“If you’re doing distributed work then you’ll find Go’s expressive concurrency primitives very helpful.” — TJ Holowaychuk, creator of Express.js
As developers coming from Node.js, switching to Go isn’t easy. We had to deal with a learning curve before we can even start building our microservices. Thankfully, we found a framework that allowed us to quickly enter the world of Go.
Fiber is a new web framework written in Go and is inspired by Express. It has a lot of methods and principles that seem to be very common to Express but still has Go’s performance.
Here’s a simple Hello World example using Fiber:
If you have used Express, the code snippet above might look something familiar. If not, take a look at an example written using Express below:
Of course the given examples above doesn’t show everything about Fiber and Express. There would still be differences between the languages they were using. Especially in terms of the discipline between writing a Go application and a Node.js application.
We just think that Fiber gave us a “feel like home” feeling because of its borrowed methods and philosophy from Express.
And since we will be writing more Go applications in the future, we have also published a Fiber REST boilerplate on Github. Our Fiber REST boilerplate can be found here: https://github.com/conflux-tech/fiber-rest-boilerplate
If you’re looking for a talented team to build your application, Conflux might be the choice for you 😎