Getting Started with GORM in Go Applications
Database Initialization
Import the primary library and the specific database driver before establishing a connection.
go get -u gorm.io/gorm
go get -u gorm.io/driver/mysql
Configure the Data Source Name (DSN) and instantiate the client. The configuration object allows customization of naming conventions and other behaviors.
import (
" ...
Posted on Wed, 02 Sep 2026 16:31:55 +0000 by Tchelo
Building a GVA-Based Admin System with Gin, Vue, and JWT
Login Handling with Sestion and JWT
Session-based authentication is required to restrict page access to logged-in users only. The Gin framework provides session middleware via github.com/gin-contrib/sessions.
import "github.com/gin-contrib/sessions"
rootRouter.GET("/login", func(c *gin.Context) {
session := sessions.Def ...
Posted on Tue, 02 Jun 2026 18:38:17 +0000 by jexx