Giter VIP home page Giter VIP logo

up.js.cool's Introduction

up.js.cool

Node.js 版本要求: >= 7.6.0

安装

config 目录下的 *.dev.* 为配置文件范例,新建对应的 *.prod.* 配置文件。

新建 MySQL 表:

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 证书教程: <>

yarn
#
npm i 

运行

  • Redis 服务
  • MySQL 服务
  • Nginx 服务*

命令

本地测试:

# 启动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

  • 图表优化
  • 加入联系方式
  • 部署教程

License

MIT

通过支付宝捐赠:

qr

up.js.cool's People

Contributors

willin avatar

Watchers

WAH avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.