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

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

倾城于你

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实时热点&新闻

 • 

*/