
Explore the basics of Go, its pros and cons, and learn to build a simple blog with Go and MySQL, featuring authentication, article creation, and APIs.
Build a Go project structure with assets, cmd, config, internal, and packages; initialize the module, run a hello world, then install Gin and serve localhost:8080 with a ping route.
Learn to externalize configuration in a golang project by reading values from a yaml file with the viber package, replacing hardcoded host and port and propagating app name across routes.
Create a routing package to initialize a router, provide a get router function, and serve the app with config, using a gen dot engine and error handling.
Create a Go serve package to streamline server setup and routing through a bootstrap process. Move route registration into internal modules and providers, then test on localhost:8080.
Create a static package to serve assets in your gin-based go project. Configure a router static path for /assets, then restart the server to verify the image default.jpg renders.
Learn to connect a Go app to a MySQL database using Gorm, configure a DSN and DB settings in YAML and code, and establish the connection.
Implement a Go seed command to populate the database with users and articles, hashing passwords with bcrypt and creating ten articles for the initial user.
Learn how the repository layer abstracts data access from business logic by implementing an Article Repository Interface and a concrete Article Repository with a list function and article limits.
Render article details in the blog project by wiring template pages for 500 and 404 errors, and display article data including title, image, and author in the show page.
Build a blog authentication flow by adding user routes, an auth controller, and a register form with a post handler, plus an html register template and testing on localhost 8080.
Implement form error handling in a blog project by persisting errors in a session, flashing them to the form on redirect, and restoring them as a map for templates.
Finalize registration by validating email uniqueness with a service and repository check, then authenticate the user by saving the user id in the session.
Validate login request, preserve errors in the session, and authenticate the user by email and password; on success, set the auth session and go to home page.
Protect routes with auth middleware, add a store handler and create article form posting to /articles/store, and render a create article template with title and content inputs.
If you're looking to learn how to build robust and scalable web applications with Go, Gin, MySQL, and GORM, this is the course for you. In this course, you will learn how to build a solid and maintainable structure for your Go web applications using some of the most popular tools and frameworks in the Go ecosystem.
We will start by discussing the principles of good application design and how to implement them in Go using a layered architecture and various design patterns. You'll also learn how to set up a project structure that facilitates code organization, reuse, and testing.
Next, we'll dive into Gin, a lightweight web framework that makes it easy to handle HTTP requests and responses in a clear and concise way. You'll learn how to use Gin to create web applications.
We'll also cover MySQL, one of the most popular relational database engines, and GORM, a powerful ORM library that provides a simple and intuitive way to work with databases in Go. You'll learn how to connect your application to a MySQL database, and how to perform common database operations such as querying, inserting, updating, and deleting data.
Throughout the course, you'll work on a sample project that demonstrates all the concepts and techniques covered. By the end of the course, you'll have a solid understanding of how to build robust and scalable web applications with Go, Gin, MySQL, and GORM, and how tomaintain them over time as they evolve and grow. With these skills, you'll be well-equipped to develop high-performance and scalable web applications that can handle large amounts of traffic and data.
In summary, this course is designed to provide you with a comprehensive and practical understanding of how to build web applications with Go, Gin, MySQL, and GORM. Whether you're new to Go or an experienced developer looking to expand your skill set, this course will equip you with the knowledge and tools you need to build high-quality and maintainable web applications. So, enroll now and start your journey to becoming a proficient Go web developer!