https://github.com/willin/up.js.cool
A monitor system powered by wresuetime
https://github.com/willin/up.js.cool
Last synced: 8 months ago
JSON representation
A monitor system powered by wresuetime
- Host: GitHub
- URL: https://github.com/willin/up.js.cool
- Owner: willin
- License: apache-2.0
- Created: 2017-02-28T04:05:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-11T23:21:44.000Z (almost 3 years ago)
- Last Synced: 2025-09-16T00:37:12.278Z (9 months ago)
- Language: JavaScript
- Homepage: https://up.js.cool
- Size: 1.01 MB
- Stars: 16
- Watchers: 4
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# up.js.cool
Node.js 版本要求: ***>= 7.6.0***
[](https://github.com/willin) [](https://codebeat.co/projects/github-com-willin-up-js-cool-master)
## 安装
`config` 目录下的 `*.dev.*` 为配置文件范例,新建对应的 `*.prod.*` 配置文件。
新建 `MySQL` 表:
```sql
CREATE TABLE `data` (
`user` char(16) NOT NULL DEFAULT '' COMMENT '用户',
`active` int(3) unsigned NOT NULL COMMENT '活跃时间(秒)',
`efficiency` decimal(5,2) NOT NULL COMMENT '效率(%)',
`date` int(10) unsigned NOT NULL COMMENT '数据时间(转时间戳)',
KEY `whereorder` (`user`,`date`),
KEY `date` (`date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
```
注意将 `Nginx` 的配置文件加入到服务中。
CertBot 签发 SSL 证书教程: <>
```bash
yarn
# 或
npm i
```
## 运行
* Redis 服务
* MySQL 服务
* Nginx 服务\*
## 命令
本地测试:
```bash
# 启动Web服务
npm run dev:server
# 启动计划任务
npm run dev:crontab
# 启动静态文件存储
npm run dev:cdn
```
## 定时任务
1. 每周一凌晨两点更新 SSL 证书
2. 每天凌晨1点清空30天之前历史数据
3. 每天凌晨0点清除采集计时器
4. 间隔50-70秒(随机)采集每个用户的数据
## TODO List
* 图表优化
* 加入联系方式
* 部署教程
## 相关项目推荐
- 阿里云SDK: https://github.com/willin/waliyun
- 腾讯云SDK: https://github.com/willin/wqcloud
- 网易云音乐SDK: https://github.com/willin/wnm
- Rescuetime SDK: https://github.com/willin/wrescuetime
## License
Apache 2.0