Skip to content
This repository has been archived by the owner on Dec 11, 2021. It is now read-only.

Corona-Studio/mcbbs-news-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcbbs-news-parser [obsolete]

A small program used to get news from "https://www.mcbbs.net/forum-news-1.html", with rest apis.

How To Use

Install

  yarn install
  rm -rf ./node_modules/consola/types

Build

  yarn build

Configuration

  cd build/
  vim(vi) ./config.json

Run (In Production Mode)

  node ./index.js Or npm run run

Configuration File Description

It is important to modify the config.json

  • checkInterval: News check interval, in millisecond.
  • pageCount: How many pages you want to fetch.
  • port: Server port

How To Get News Using Rest API?

I provided two routes to get the result from the program

  • "http://[ADDRESS]:[PORT]/rest/api/news/": This is the default route to get the news, by default, it will return 20 news.
  • "http://[ADDRESS]:[PORT]/rest/api/news/:count": This api has a custom parameter "count", you can specify how many news you want to get one time.

Releases

No releases published

Packages

No packages published