惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

倾城于你

EasyNote:极简自托管记事本 - 倾城于你 哪吒面板数据库瘦身-从1.2G到6M - 倾城于你 最具颜值的VPS剩余价值计算器来了 - 倾城于你 Typecho字体插件ZFonts已开源 - 倾城于你 MS订阅自助管理系统CF-M365-Admin - 倾城于你 推荐一款小而美的Windows剪贴板利器ElegantClipboard - 倾城于你 CDT-Monitor:阿里云 CDT 流量监控与自动化熔断工具 - 倾城于你 ZenShellHub单文件脚本管理中心 - 倾城于你 xg-nav一个简洁、纯HTML静态的个人导航站 - 倾城于你 一键部署Poste.io邮件服务器指南 - 倾城于你 推荐一个轻量级、高性能的多功能程序HubProxy - 倾城于你 安利一款小说下载器so-novel - 倾城于你 本站的公益服务&API接口独立页面已开放 - 倾城于你
Newsnow实时热点&新闻 - 倾城于你
博主: 青柠 · 2025-08-23 · via 倾城于你
  • 发布时间:
  • 4942 次浏览
  • 暂无评论
  • 2157字数
  • 分类: 开源推荐
  •  百度已收录
  1. 首页
  2. 开源推荐
  3. 正文  

Newsnow

优雅地阅读实时热门新闻

预览Demo

部署指南

基础部署

无需登录和缓存功能时,可直接部署至 Cloudflare Pages 或 Vercel:

  1. Fork 本仓库
  2. 导入至目标平台

Cloudflare Pages 配置

  • 构建命令:pnpm run build
  • 输出目录:dist/output/public

GitHub OAuth 配置

  1. 创建 GitHub App
  2. 无需特殊权限
  3. 回调 URL 设置为:https://your-domain.com/api/oauth/github(替换 your-domain 为实际域名)
  4. 获取 Client ID 和 Client Secret

环境变量配置

参考 example.env.server 文件,本地运行时重命名为 .env.server 并填写以下配置:

# Github Clien ID
G_CLIENT_ID=
# Github Clien Secret
G_CLIENT_SECRET=
# JWT Secret, 通常就用 Clien Secret
JWT_SECRET=
# 初始化数据库, 首次运行必须设置为 true,之后可以将其关闭
INIT_TABLE=true
# 是否启用缓存
ENABLE_CACHE=true

数据库支持

本项目主推 Cloudflare Pages 以及 Docker 部署, Vercel 需要你自行搞定数据库,其他支持的数据库可以查看 https://db0.unjs.io/connectors

  1. 在 Cloudflare Worker 控制面板创建 D1 数据库
  2. wrangler.toml 中配置 database_iddatabase_name
  3. 若无 wrangler.toml ,可将 example.wrangler.toml 重命名并修改配置
  4. 重新部署生效

Docker 部署

对于 Docker 部署,只需要项目根目录 docker-compose.yaml 文件,同一目录下执行

docker compose up
services:
  newsnow:
    image: ghcr.io/ourongxing/newsnow:latest
    container_name: newsnow
    ports:
      - '4444:4444'
    volumes:
      - newsnow_data:/usr/app/.data
    environment:
      - HOST=0.0.0.0
      - PORT=4444
      - NODE_ENV=production
      - G_CLIENT_ID=
      - G_CLIENT_SECRET=
      - JWT_SECRET=
      - INIT_TABLE=true
      - ENABLE_CACHE=true

volumes:
  newsnow_data:
    name: newsnow_data

同样可以通过 docker-compose.yaml 配置环境变量。

开源地址

🏷本文标签:Docker,️Vercel,️Cloudflare,️Newsnow,️新闻热榜

赞赏作者

如果觉得我的文章对你有用,请随意赞赏

Newsnow实时热点&新闻

 • 

*/