Skip to content

Instantly share code, notes, and snippets.

@ferdbold
Created October 2, 2015 00:29
Show Gist options
  • Save ferdbold/7ca4e80ffdfef03d77c0 to your computer and use it in GitHub Desktop.
Save ferdbold/7ca4e80ffdfef03d77c0 to your computer and use it in GitHub Desktop.
Parsoid local settings
/**
* Parsoid web service configuration file.
* This file is managed by Puppet.
*/
exports.setup = function( parsoidConfig ) {
parsoidConfig.setMwApi( {
prefix: 'localhost',
domain: '127.0.0.1',
uri: 'http://127.0.0.1:8080/w/api.php',
} );
parsoidConfig.usePHPPreProcessor = true;
parsoidConfig.useSelser = true;
parsoidConfig.allowCORS = '*';
// Direct logs to logstash via bunyan and gelf-stream.
// To enable Logstash on MediaWiki-Vagrant:
// vagrant roles enable elk; vagrant provision
//
// See `vagrant roles info elk` for more information.
parsoidConfig.loggerBackend = {
name: ':Logger.bunyan/BunyanLogger',
options: {
name: 'parsoid',
streams: [
{
stream: process.stdout,
level: 'debug'
},
{
type: 'raw',
stream: require('gelf-stream').forBunyan('127.0.0.1', 12201),
level: 'debug'
}
]
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment