Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.
/ notification Public archive
generated from imhele/egg-template

小而美的通知中心,适用于站内信、评论区等场景。

Notifications You must be signed in to change notification settings

alitajs/notification

Repository files navigation

notification

Alita Build Status Coverage Status

小而美的通知中心,适用于站内信、评论区等场景。

Feature

  • 类即时通讯应用架构,支持多设备消息同步与漫游
  • 支持类群聊模式,可根据实际场景手动切换读写扩散模型
  • 支持 MySQL / TableStore (WIP)
  • 部分主键常驻 Redis 实现严格自增
  • 分会话未读消息数量统计
  • 支持已发出消息撤回,可类比自行实现消息内容更新等功能
  • 钩子函数拓展业务逻辑,例如写入消息成功后执行发送邮件、消息推送等任务

Usage

Config

绝大部分配置可在 config/config.default.ts 中找到,可参考 Egg - 配置

Dependencies

首先需要安装 Redis 、 Mysql 或 MariaDB 、 NodeJS 与 npm / yarn ,NodeJS 官方安装包通常会自带 npm ,你也可以使用 yarn 代替 npm 进行后续操作。

Windows 平台上 yarn run cov 无法正常执行,请使用 npm run cov 代替。

开发环境

# Ubuntu
$ git clone https://github.com/alitajs/notification.git
$ cd notification
$ npm install
$ apt-get install nodejs
$ sh ./scripts/install/mariadb.sh
$ sh ./scripts/install/redis.sh
$ npm run start:mysql && npm run start:redis && npm run dev:migrate
$ npm run dev

生产环境

# Ubuntu
$ git clone https://github.com/alitajs/notification.git
$ cd notification
$ npm install --production
$ apt-get install nodejs
$ sh ./scripts/install/mariadb.sh
$ sh ./scripts/install/redis.sh
$ npm run start:mysql && npm run start:redis && npm run start:migrate
$ npm run restart:tsc

Framework

Database

image

About

小而美的通知中心,适用于站内信、评论区等场景。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published