Skip to main content

Config

Server configuration config/server.ts Client configuration config/client.ts

Compared to directly modifying the configuration file, it is recommended to use environment variables to modify the configuration
Create a .env file in the fiora root directory and enter key=value key-value pair (one per line) to modify the configuration. For example, modify the port number Port=8888

Server Config#

Modifying the server configuration requires restarting the application

KeyTypeDefaultDescription
Hoststringyour ipbackend server host
Portnumber9200backend server port
Databasestringmongodb://localhost:27017/fioramongodbb address
RedisHoststringlocalhostredis host
RedisPortnumber6379redis port
JwtSecretstringjwtSecret (Modify it to ensure safety)jwt token encryption secret
MaxGroupCountnumber3Maximum number of groups created per user
AllowOriginstringnullThe list of allowed client origins. If null, all origins are allowed. Multiple values separated by comma
tokenExpiresTimenumber2592000000 (30days)login token expires time
Administratorstring''Administrator userId list. Multiple values separated by comma
DisableRegisterbooleanfalseDisable register
DisableCreateGroupbooleanfalseDisable create group
ALIYUN_OSSbooleanfalseenable to use aliyun OSS
ACCESS_KEY_IDstring''aliyun OSS access key id. reference: https://help.aliyun.com/document_detail/48699.html
ACCESS_KEY_SECRETstring''aliyun OSS access key secret. reference like ACCESS_KEY_ID
ROLE_ARNstring''aliyun OSS RoleARN. reference: https://help.aliyun.com/document_detail/28649.html
REGIONstring''aliyun OSS region. example: oss-cn-zhangjiakou
BUCKETstring''aliyun OSS bucket name
ENDPOINTstring''aliyun OSS domain. example: cdn.suisuijiang.com

Client Config#

Modifying the client configuration requires rebuilding the client

KeyTypeDefaultDescription
Serverstring/Server address of the client connection
MaxImageSizenumber3145728 (3MB)The maximum image size that the client can upload
MaxBackgroundImageSizenumber5242880 (5MB)The maximum background image size that the client can upload
MaxAvatarSizenumber1572864 (1.5MB)The maximum avatar image size that the client can upload
MaxFileSizenumber10485760 (10MB)The maximum file size that the client can upload
DefaultThemestringcooldefault theme
Soundstringdefaultdefault notification sound
TagColorModestringfixedColordefault tag color mode
FrontendMonitorAppIdstringfixedColorappId of monitor https://yueying.effirst.com/index
DisableDeleteMessagebooleanfalsedisable user delete messages