Build an app with Go Beego: Video Post + Interactive Code
In this coding session, we will use Golang’s Beego web framework to build an API / Web app from scratch. At the end of the post, you can find Repl.it code editor with the corresponding source code. This post is part of my Golang Beego Video Tutorial series.
Go Beego Coding Session
In this particular part, we will set a project goal and start a new Beego project. Even so, I am aiming for the API project. We will set up our demo with the
bee new command, meaning that it will also include views.
What’s included in this part:
- Bootstrap a new project with the Beego web framework.
- Review the project’s structure: Model, View, Controller.
- Introduce a new controller with its router and view.
Initial model structure:
We aim for a very simple data model. Our main goal here is to introduce two entities and have one foreign key between them.
Based on these models, we will have the following API endpoints:
Go Beego Project: Source Code
In this section, you can visit the source code for this project and check the interactive code editor below. In the live interactive editor, you can execute the application described in this video post.