Git Product home page Git Product logo

2019-ncov-news's Introduction

2019-nCoV疫情实时播报🅥|墙内传播版

后端接口代码在这里(由 @QuantumGhost 提供,感谢他的贡献。)

电报上的那个频道是我知道的汇总国内官方渠道的疫情数据,做得最好的。我有天天看。(当然我也知道官方消息只有基本参考价值)。

但我这两天在安利这个频道时犯了难,因为我得先让朋友下载个 Telegram,还得教他翻墙...... 考虑到这个难题,我连夜写了这个网页:https://2019ncov.ga )(已下线)

国内可以直接访问查看频道更新的消息。

(建议发给国内没有 Telegram 账户的朋友使用。)

数据来自:Telegram 同名频道提供的RSS 源

项目预览:(Mobile)

previews

同名Telegram频道长这样:

3

部署到其他地方

项目前后端分离,本仓库仅包含前端部分。

前端部分部署

将前端资源文件(dist/)上传到服务器即可。

# 1. 下载项目,通过git命令或者自行下载ZIP文件
git clone [email protected]:thegreatjavascript/2019-nCoV-News.git

# 2. 命令行下进入到项目文件夹
cd 2019-nCoV-News

# 3. 使用scp命令将资源文件上传到服务器对应目录下,比如下面命令(hostname/ip/路径 请自行更改成你的)
scp -r ./dist/* [email protected]:/var/www/html

后端部分部署(非必须)

消息数据由此后端项目提供,通过Python调用Telegram接口来获取。除非你有特别的理由,否则不建议折腾。

环境要求:

  1. Node.js
  2. npm(正常情况下安装完Node.js后会自动附带安装好,无需另行安装)
  3. Python3
# 1. 下载项目,通过git命令或者自行下载ZIP文件
git clone [email protected]:QuantumGhost/ncov-channel-crawler.git

# 2. 命令行下进入到项目文件夹
cd ncov-channel-crawler

# 3. 请移步 https://github.com/QuantumGhost/ncov-channel-crawler#ncov-news-crawler

# 4. 部署完Python项目后,需要回过头来修改下前端 `request.js` 中的`api`地址为后端监听的路由地址

# 5. 重新打包前端项目,生成最新的资源文件
cd 2019-nCoV-News
# 安装项目依赖
# 也可以使用`yarn`/`cnpm install`(如果你不是前端开发者,建议使用`cnpm install` ,自行Google安装`cnpm`命令,解决国内下载依赖慢的问题)
npm install
# 生成资源文件
npm build

# 6. 重新将最新的资源文件上传到服务器,详细说明同上
scp -r ./dist/* [email protected]:/var/www/html

2019-ncov-news's People

Contributors

shuirong 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.