Member-only story
A Beginner’s Guide To Web Development In Go Using The Martini Framework
Learning a new framework is always fun
I recently stumbled upon this cool framework for Golang. It’s a web development framework that makes web development a whole lot easier.
In this new Golang article, I’ll teach you the basics of setting up a web server with the Martini Framework.
Requirements.
To get started with this Framework, you need to have Go installed on your machine and have a basic knowledge of the Golang programming language.
Preparing Your Workspace.
To program in Go, you need an editor, and I use VS Code for Mac. When you’ve set up your code editor, you need to prepare your workspace. To initialize a project, we use the following command:
$ go mod init example.ext/usr/name
This will create a go.mod
file, and here it will store all the information about your project, for example, the packages you install.
Now execute the following command:
$ cat go.mod
Getting Started.
Now, let’s get started with the Martini Framework. We have to install it through the go get
command: