Evolution Land backend service provides game data such as land plots, apostles, NFT assets, etc.
Explore Evolution Land Documentation »
Explore Evolution Land Backend API Documentation »
View Evolution Land Game
·
Report Bug
·
Suggest New Features
- Getting Started
- File Directory Description
- Configuration
- Architecture
- Deployment
- Copyright Statement
- Golang version >= 1.22
- Mysql version >= 8.0
- Redis version >= 7.0
- Clone the repo
git clone https://github.com/evolutionlandorg/evo-backend
- Install dependencies
go mod download
- Run the server
go run .
├── Dockerfile # Dockerfile for building the image, you can use it to build the image.
├── LICENSE.txt
├── README.md
├── commands # Some useful commands
├── config # Configuration files such as contract addresses on the chain, etc.
├── contract # Contract ABI files
├── daemons # Tasks that need to run in the background, such as retrieving blocks, retrieving user assets, etc.
├── data # Some configuration information about materials and equipment
├── docs # API documentation
├── go.mod
├── go.sum
├── main.go
├── middlewares # Gin middleware
├── models # Data models
├── pkg # Third-party libraries
├── routes # API routes
├── services # Business logic
└── util # Utility classes
All configurations are configured through environment variables
Configuration Name | Default Value | Description |
---|---|---|
MYSQL_HOST | 127.0.0.1 | mysql host |
MYSQL_PORT | 3306 | mysql port |
MYSQL_DB | consensus-backend | mysql database name |
MYSQL_USER | root | mysql username |
MYSQL_PASSWORD | 123456 | mysql password |
REDIS_HOST | 127.0.0.1 | redis host |
REDIS_PORT | 6379 | redis port |
REDIS_PASSWORD | redis password | |
REDIS_DATABASE | 0 | redis database |
SSL | true | Whether to use SSL for ETH rpc |
GIN_MODE | gin running mode | |
EVO_ENV | production | Environment variable, production means production environment, dev means development environment |
WEB_HOST | https://portal.evolution.land | web host |
APOSTLE_SVG | http://apostle-svg | apostle svg host |
HECO_RPC | https://http-testnet.hecochain.com | heco rpc host |
HECO_WSS_RPC | wss://ws-testnet.hecochain.com | eth rpc host |
POLYGON_RPC | https://polygon-mumbai.api.onfinality.io/public | polygon rpc host |
POLYGON_WSS_RPC | https://polygon-mumbai.api.onfinality.io/public | polygon wss rpc host |
ETH_RPC | eth rpc host | |
ETH_WSS_RPC | eth wss rpc host | |
CRAB_NODE | https://crab-rpc.darwinia.network | crab rpc host |
CRAB_WSS_RPC | wss://crab-rpc.darwinia.network | crab wss rpc host |
LOG_LEVEL | DEBUG | Log level |
DATABASE_SHOW_LOG_DEBUG | false | Show database log or not |
TRON-PRO-API-KEY |
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_DB=consensus-backend
MYSQL_USER=root
MYSQL_PASSWORD=123456
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DATABASE=0
WEB_HOST=https://evolutionland-dev.vercel.app
APOSTLE_SVG=http://apostle-svg # https://github.com/evolutionlandorg/apostle-svg project service address
ETH_RPC= # eth testnet has been deprecated
ETH_WSS_RPC= # eth testnet has been deprecated
HECO_RPC=https://http-testnet.hecochain.com
HECO_WSS_RPC=wss://ws-testnet.hecochain.com
POLYGON_RPC=https://polygon-mumbai.api.onfinality.io/public
POLYGON_WSS_RPC=https://polygon-mumbai.api.onfinality.io/public
CRAB_NODE=https://crab-rpc.darwinia.network
CRAB_WSS_RPC=wss://crab-rpc.darwinia.network
LOG_LEVEL=DEBUG
DATABASE_SHOW_LOG_DEBUG=true
TRON-PRO-API-KEY=
EVO_ENV=dev
- Pull the latest code:
git clone https://github.com/evolutionlandorg/evo-backend
- Build the image:
docker build -t evo-backend:latest .
- Run the image:
docker run -d -p 8080:8080 --restart=always --name evo-backend evo-backend:latest
This project is licensed under the terms of the MIT license, see LICENSE.txt