The map and graph modules of Wikileak's ProjectK, the diplomatic cables of the Kissinger era.
JavaScript CSS
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
public
views
.gitignore
.nodemonignore
README.md
app.js
data.js
package.json
routes.js

README.md

Wikileaks: Kissinger Cables

Installation

Software dependencies

To make the project up and running, you need:

  • Node 0.8.19
  • NPM 1.1.32
  • PostGreSQL 9.1

Step 0:

Esnure that postgresql-server-dev-9.1, libxml2, libxml2-dev and gyp packages are present on your system.

Step 1: Download the dependencies

The app is build at the top of the pleasant Node Package Manager. To download and set up the whole dependancies three, simply run from the project's root directory :

$ npm install

Step 2: Edit the configuration

Use configuration file

The default configuration is present into config/default.json. Every modifications in this file will be commited. The runtime.json file is an auto-generated file that you shouldn't edit.

  • Development mode: If you want to overide default values, you have to create a file named config/development.json and corresponding to your local configuration. This file will be ignored by git.
  • Production mode: if you want to overide default values, you have to edit the config/production.json file to fit with your production environment. This file will be ignored by git.

Alternative: use environment variables

The following environment variables can be use with the highest priority :

  • PORT defines the port to listen to (ex: 80);
  • DATABASE_URL defines the database URL;
  • NODE_ENV defines the runtime mode that affects the configuration (ex: development, production, etc).

Step 3: Build the database

Download the ngram's database from this torrent then extract the downloaded archive:

$  gzip -d ngrams.sql.gz

Finally, import the sql file into your database. 214,549,557 lines, it can be long:

$ psql DATABASE_NAME < ngrams.sql    

Step 4: Run!

To launch the application enter the following command:

$ node app.js

Your application is now available from localhost:3000/plusd/!

Common issues

GNU General Public License

This software is the property of Journalism++ and licensed under the GNU Genral Public License.