npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

coro-api

v1.0.2

Published

新型冠状病毒 API

Downloads

1

Readme

coro-api

新型冠状病毒 实时数据 api

API示例

获取全部

https://api.yimian.xyz/coro

根据省份

https://api.yimian.xyz/coro?province=山东

根据城市

https://api.yimian.xyz/coro?city=泰安

根据省和城(推荐)

https://api.yimian.xyz/coro?province=山东&city=泰安

快速部署

环境要求

  • nodeJS支持express任意版本
  • git任意版本

下载文件

$ git clone https://github.com/iotcat/coro-api.git & cd coro-api

安装依赖

$ npm install

启动

$ node index.js

访问

http://localhost:17676

进阶

GET参数

参数 | 描述 | 示例 :--: | :--: | :--: province | 省份(国家) | 山东 city | 城市 | 泰安

修改端口

index.js第9行修改默认端口。

禁止跨域

注释掉index.js第13行。

使用pm2守护进程

$ npm i -g pm2
$ pm2 start index.js --name coro-api -o /var/log/coro/api.out -e /var/log/coro/api.err --watch

Nginx配置

将以下内容加入server{}

location / {
    proxy_pass   http://127.0.0.1:17676;
}

如果你不是从根目录映射,记得去index.js中第11行app.get('/', f)修改成你的路径。

爬虫配置

爬虫使用coro-py, 请参考其文档。

开源协议

本项目使用MIT协议,允许非署名商业非商业使用。武汉加油!中国加油!!❤