| commit | af75069aa70af8855ead03e8fc96022801cb9853 | [log] [tgz] |
|---|---|---|
| author | libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> | Fri Jul 03 11:12:09 2026 +0000 |
| committer | libraryupgrader <tools.libraryupgrader@tools.wmflabs.org> | Fri Jul 03 11:13:16 2026 +0000 |
| tree | 05b64c043705f6532bd49ca4d7a7991dfe19cd2a | |
| parent | 62d67d53f0ca9dc3c7c5cf3bb81f58a62ab54327 [diff] |
build: Updating js-yaml to 3.15.0, 4.2.0 * https://github.com/advisories/GHSA-h67p-54hq-rp68 Change-Id: Ia81ddc156ef49bd14b8a3c29578a560937de902b
A node.js webservice supporting the Explore feeds in the official Wikipedia Android and iOS apps.
First, clone the repository
git clone https://gerrit.wikimedia.org/r/mediawiki/services/wikifeeds
Install the dependencies
cd wikifeeds npm install
You are now ready to get to work!
app.jsroutes/ (look at the files there for examples)To start the server hosting the REST API, simply run (inside the repo's directory)
npm start
This starts an HTTP server listening on localhost:8889.
There are a few routes you may query (with a browser, or curl and friends). You can see more documentation at localhost:8889/?doc.
http://localhost:8889/en.wikipedia.org/v1/page/featured/2016/05/30http://localhost:8889/en.wikipedia.org/v1/media/image/featured/2016/05/30http://localhost:8889/en.wikipedia.org/v1/page/newshttp://localhost:8889/en.wikipedia.org/v1/page/most-read/2016/05/30http://localhost:8889/en.wikipedia.org/v1/page/random/titlehttp://localhost:8889/en.wikipedia.org/v1/feed/onthisday/births/05/30http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/deaths/05/30http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/events/05/30http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/selected/05/30http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/holidays/05/30http://localhost:8889/en.wikipedia.org/v1/feed/onthisday/all/05/30http://localhost:8889/en.wikipedia.org/v1/feed/announcementsNote that day and month need to be 2 digits to be accepted. 0-pad them if necessary.
Feed endpoint availability by language:
http://localhost:8889/wikimedia.org/v1/feed/availabilitySwagger spec:
http://localhost:8889/?specSwagger UI:
http://localhost:8889/?docInfo:
http://localhost:8889/_infoThere is also a set of executable tests. To fire them up, simply run:
npm test
If you haven't changed anything in the code (and you have a working Internet connection), you should see all the tests passing. As testing most of the code is an important aspect of service development, there is also a bundled tool reporting the percentage of code covered. Start it with:
npm run-script coverage
To just run the unit tests (faster), use:
npm run test:unit