express-wikimedia-api-proxy

1.1.1 • Public • Published

express-wikimedia-api-proxy

  • Building an express Node.js app?
  • Want to make use of Wikipedia's APIs
  • Don't want to worry about CORs requests?
  • Need something compatible with oauth for API requests which need credentials?

If yes to the above look no further. This simple module is designed to plug into your express app and give you access to Wikimedia's many APIs. That includes Wikipedia, Wiktionary, Wikivoyage and many more.

All APIs available @

how to use!

  const express = require('express');
  const wikiApis = require('express-wikimedia-api-proxy');
  const app = express();
  const cors = require('cors');
  const PORT = app.get( 'port' ) || 8145;

  const base = '/api/wikimedia/';

  wikiApis(app, base, true);
  app.use(cors())
  app.listen(PORT)
  console.log('The APIs are exposed at port:', PORT)
  console.log('http://localhost:' + PORT + base + 'en.wikipedia.org/api.php');
  console.log('http://localhost:' + PORT + base + 'en.wikipedia.org/rest_v1/');

Dependents (0)

Package Sidebar

Install

npm i express-wikimedia-api-proxy

Weekly Downloads

13

Version

1.1.1

License

none

Unpacked Size

19.3 kB

Total Files

9

Last publish

Collaborators

  • jdlrobson