go-admingo-admin
  • Guide
  • Development
    • Advanced
    • Commands
  • Advanced
  • Help
  • GitHub
  • Changelog
⌘ K
Standard Practice
Standard Module Development
Backend Basics
Backend Directory Structure
Backend Config File
Starting the Backend
Frontend Basics
Frontend Directory Structure
Frontend Config File
Starting the Frontend
Development Patterns
Actions Pattern
Hand-Written Pattern
First API Endpoint
Layered Development
API Layer
Service Layer
DTO Definitions
Model Definitions
Router Registration
Multi-Environment Config
Database Table Conventions
Data Permissions
Response Format
Code Generation
Pre-Generation Setup
Generating Business Code
One-Click Menu Generation
Binding APIs to the Menu
Configuring Role Permissions
Verifying the Feature
Generating Code with an LLM
Advanced Capabilities
Runtime Core API
Authentication & Authorization
Logging
Request Tracing
Cache
Queue
File Upload
Rate Limiting
Scheduled Jobs
Air Hot Reload
Swagger Docs
Code Generation Tool
Last updated:
Open-source MIT Licensed | Copyright © 2020-present
Powered by go-admin-team

TABLE OF CONTENTS

‌
‌
‌
‌

Config File Overview

Using go-admin for the first time needs one round of initial setup, mainly the database connection. MySQL is recommended, or you can get going quickly with the SQLite demo database the repo ships with (some features, like code generation, aren't supported there).

Open config/settings.yml and focus on the database section:

yml
settings:
database:
driver: mysql
source: user:password@tcp(127.0.0.1:3306)/dbname?charset=utf8&parseTime=True&loc=Local&timeout=5000ms

Swap the three parts of source for your own:

  • user — the database username
  • password — the database password
  • dbname — the database name, which needs to exist beforehand

The remaining config sections (application, jwt, logger, gen, etc.) can stay at their defaults and things will run — the full field reference is in the Config Reference. The current version has no application.logpath field — the log path is logger.path.

WARNING

Before going to production, jwt.secret must be replaced with a random string (the default is go-admin), and application.mode must be set to prod. See the Config Reference for details.

WARNING

Where to get help:

If anything in this guide is unclear, please open an issue.