npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mediawiki-express

v1.26.0

Published

An installation of mediawiki invoked from node.js/express.

Readme

node-mediawiki-express

NPM

Build Status dependency status dev dependency status

The node mediawiki-express package uses the php-embed package to embed MediaWiki with a node express server.

This is a proof-of-concept for a "single integrated install" of MediaWiki, which will eventually bundle Parsoid and other PHP and JavaScript services into a single server.

We hope to eventually allow easy addition of extensions and skins via npm. See https://phabricator.wikimedia.org/T114457 for more discussion.

USAGE

To start a HTTP server on port 1234:

mediawiki -p 1234

Your wiki will then be found at http://localhost:123/wiki/

API

To customize or extend your MediaWiki server, you can use the JavaScript API.

mwExpress.runServer(options)

Starts an express web server on a specified port, with /w and /wiki routed to a MediaWiki installation. The MediaWiki can be customized via the options parameter.

  • options: an object containing various parameters for the server. All are optional.
    • serverName: the server name to pass to PHP, which will be used as part of MediaWiki's generated URLs. Defaults to localhost.
    • serverPort: the port on which to start the server. Defaults to 8080.
    • localSettingsHook: a JavaScript function which will be invoked at the end of MediaWiki's LocalSettings.php file, and passed PHP's $GLOBALS array as its first parameter. This allows you to customize the settings for the wiki.
    • expressHook: a JavaScript function which will be invoked after the MediaWiki-related routes have been set up on the express app object. It is passed the app object as its first parameter. This allows you to add additional routes to the server before starting it. The / route will be added after expressHook returns (as a redirect to the main page of the wiki), so you can override the / route in this hook if you wish.

INSTALLING

You can use npm to download and install:

  • The latest mediawiki-express package: npm install mediawiki-express

  • GitHub's master branch: npm install https://github.com/cscott/node-mediawiki-express/tarball/master

As a postinstall script, npm will configure mediawiki and create an SQLite database for it to use. It will create an admin account and store its credentials in admin.json for you.

TESTING

Currently npm test only runs a linter. Hopefully in the future we can hook up phantomjs to run the mediawiki test suite.

CONTRIBUTORS

RELATED PROJECTS

  • php-embed: Provides the bidirectional Node<->PHP embedding.
  • php-express: A similar embedding of PHP into a Node.js server, but forks the PHP CLI binary in a separate process instead of embedding PHP.
  • php-cgi: Another implementation forking the php binary and forging a CGI request.

LICENSE

Copyright (c) 2015 C. Scott Ananian.

mediawiki-express is licensed using the same license as mediawiki itself.