Skip to content

shPisces/newsnow

This branch is 119 commits behind ourongxing/newsnow:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8b98e62 · Oct 25, 2024
Oct 23, 2024
Oct 22, 2024
Oct 25, 2024
Oct 23, 2024
Oct 21, 2024
Oct 25, 2024
Oct 25, 2024
Oct 25, 2024
Oct 8, 2024
Oct 24, 2024
Oct 23, 2024
Oct 20, 2024
Oct 23, 2024
Oct 10, 2024
Oct 25, 2024
Oct 25, 2024
Oct 23, 2024
Oct 13, 2024
Oct 21, 2024
Oct 22, 2024
Oct 25, 2024
Oct 24, 2024
Sep 29, 2024
Sep 29, 2024
Sep 29, 2024
Oct 24, 2024
Oct 22, 2024
Oct 24, 2024
Oct 12, 2024
Oct 13, 2024

Repository files navigation

NewsNow

English | 简体中文

Elegant reading of real-time and hottest news

Deployment

If login and caching are not required, you can directly deploy to platforms like Cloudflare Pages or Vercel. Just fork the repository and import it into the respective platform.

For login, which involves GitHub OAuth, you only need to create a GitHub App. No special permissions are required. After creating the app, you will get a Client ID and Client Secret. Different platforms have different places to set environment variables; refer to the example.env.server file. If running locally, rename it to .env.server and add the necessary values.

# Github Client ID
G_CLIENT_ID=
# Github Client Secret
G_CLIENT_SECRET=
# JWT Secret, usually the same as Client Secret
JWT_SECRET=
# Initialize database, must be set to true on first run, can be turned off afterward
INIT_TABLE=true

This project primarily supports deployment on Cloudflare Pages and Docker. For Vercel, you need to set up your own database. Supported databases can be found at https://db0.unjs.io/connectors .

Cloudflare D1 database is free to use. You can manually create a database in the Cloudflare Worker control panel and add the database_id and database_name to the corresponding positions in wrangler.toml. The changes will take effect on the next deployment.

For Docker deployment. In the project root directory with docker-compose.yml, run

docker compose up

Development

Tip

Node version >= 20

corepack enable
pnpm i
pnpm dev

If you want to add data sources, refer to the shared/metadata, shared/sources, and server/sources directories. The project has complete types and a simple structure; feel free to explore.

License

MIT © ourongxing

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.9%
  • Other 2.1%