alioth/before/hoto/reference/P01CentralControl/config/pro.conf.js
2025-05-30 09:18:01 +08:00

56 lines
1.4 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// | ------------------------------------------------------------
// | @版本: version 0.1
// | @创建人: 【Nie-x7129】
// | @E-mail: x71291@outlook.com
// | @所在项目: P01CentralControl
// | @文件描述: pro.conf.js -
// | @创建时间: 2024-01-13 21:15
// | @更新时间: 2024-01-13 21:15
// | @修改记录:
// | -*-*-*- (时间--修改人--修改说明) -*-*-*-
// | =
// | ------------------------------------------------------------
const config = {
// @ 项目名
projectName: 'Plan2160-P01 Central Control',
// 服务启动监听
listen: {
// @ 监听地址
host: '0.0.0.0',
// @ 监听端口
port: 21601,
},
// @ 中央控制器账户密码
administrator: {
username: 'expressgy',
userpass: '**Hxl@1314521'
},
// @ redis
redis: {
host: '172.16.1.10',
port: 6379,
password: 'redispassword'
},
// jwt
jwt: {
// token的加密值
secret: 'xadvdgfhga21xabhgnumo;opilkujya8axa21',
sign: {
// token过期时间
expiresIn: '20m'
}
},
// 防止恶意访问
rateLimit: {
// 限制每个 IP 地址在时间窗口内最多可以发出的请求数
max: 500,
// '1 second' = '1000'1 秒 | '1 minute' 1 分钟 | '1 hour' 1 小时 | '1 day' 1 天 | '1 week' 1 周
timeWindow: '1 day'
}
};
export default config;