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

Each of the three environments has its own file: .env.development (local dev), .env.production (production build), .env.staging (staging). The two variables that matter are the same across all three:

bash
# just a flag
ENV = 'development'
# base api
VUE_APP_BASE_API = 'http://localhost:8001'
  • ENV just labels the current environment and generally doesn't need to change;
  • VUE_APP_BASE_API is the backend service address — every frontend request gets built on top of it.

WARNING

On a fresh clone, the frontend's default port doesn't match the backend's. .env.development defaults to localhost:8001, while the backend's default port in config/settings.yml is 8000. Running both at their defaults leaves the frontend unable to reach the backend — network errors on login and a captcha that won't load are both this same cause.

Just make the two agree: either change .env.development to http://localhost:8000, or change the backend's application.port to 8001.

What to Put There When Deploying

  • Same-origin deployment (recommended, see Deployment) — leave it empty; requests go to the current domain and Nginx forwards them to the backend. The .env.production shipped in the repo is already set up this way (VUE_APP_BASE_API = '');
  • Frontend and backend on different domains — fill in the backend's full address, e.g. https://api.example.com.

Common Issues

If the captcha won't load or requests error out, first check the address VUE_APP_BASE_API points to in the file for the current environment: is the backend actually listening there, and is that address reachable directly from the browser?

WARNING

Where to get help:

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