Skip to content
This repository was archived by the owner on Aug 6, 2022. It is now read-only.

I.4. Basic configuration

Andrey Bogdanov edited this page Feb 25, 2016 · 5 revisions

Configuration file

For the application to operate properly, you should add some basic configuration. First of all, create a configuration file: config.json. Then, insert the following content:

{
    "server": {
        "port": 80,
        "youtubeApiKey": "Your YouTube API key here"
    },
    "site": {
        "protocol": "http",
        "domain": "localhost:80"
    },
    "board": {
        "captchaEnabled": true,
        "launchDate": "2015-02-12T21:00:00",
        "int": {
            "showWhois": true
        }
    },
    "captcha": {
        "google-recaptcha": {
            "privateKey": "Your Google reCAPTCHA private key here",
            "publicKey": "Your Google reCAPTCHA public key here"
        },
        "google-recaptcha-v1": {
            "privateKey": "Your Google reCAPTCHA v1 private key here",
            "publicKey": "Your Google reCAPTCHA v1 public key here"
        },
        "codecha": {
            "privateKey": "Your Codecha private key here",
            "publicKey": "Your Codecha public key here"
        }
    }
}

Note: This is only a small piece of configuration options, required for the application to work properly. Other configuration options are described here: II.1. Configuration.

Configuration options

server.port

The port on which the server will listen for connections. Normally 80, but the value may differ if the traffic goes through some HTTP server, such as nginx.

server.youtubeApiKey

YouTube API key used to retrieve YouTube videos information in the posts and to markup the corresponding links properly (adding a tooltip with video title and thumbnail, and creating an expandable embedded YouTube player). YouTube API documentation.

site.protocol

The preferred protocol (either http or https). Used for links in the generated RSS feed, and for providing file links to external image search engines (such as TinEye).

site.domain

Used for the same purpose as the site.protocol.

board.captchaEnabled

Enables or disables the captcha.

board.launchDate

Your imageboard launch date. Used to calculate posting speed. Must be specified in the ISO format: YYYY-MM-DDThh:mm:ss. Example: 2015-02-12T21:00:00.

board.int.showWhois

Show the country (with the corresponding contry flag) and the city of a user on the /int/ (International) board. You may enable this option on any board (but normally you shoudl not).

Note: Geolocation information is stored for each post, no matter if the showWhois option is enabled, but it is does not appear on the pages unless the option is enabled.

Captcha private and public keys

You have to specify captcha private and public keys for each captcha service. Private keys are used on the server only, and public keys appear on the site pages.

Links:

Note: By default, Codecha is the only available captcha for the /pr/ (Programming) board. You should provide the Codecha service keys, or enable other captcha engines for that board (see II.1. Configuration).

Clone this wiki locally