serve frontend from go
This commit is contained in:
13
internal/posts/resource.go
Normal file
13
internal/posts/resource.go
Normal file
@ -0,0 +1,13 @@
|
||||
package posts
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
// Service Represents a service with a database connection.
|
||||
type Service struct {
|
||||
db *gorm.DB
|
||||
}
|
||||
|
||||
// Service New creates a new Service instance, initializing it with a GORM database connection.
|
||||
func New(db *gorm.DB) *Service {
|
||||
return &Service{db: db}
|
||||
}
|
Reference in New Issue
Block a user