Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Latest commit

 

History

History
80 lines (68 loc) · 3.32 KB

CONFIGURATION.md

File metadata and controls

80 lines (68 loc) · 3.32 KB

Configuring the Storytelling Tool

Server Configuration

The server is configurable by means of a JSON5 Kettle configuration file called sjrk.storyTelling.server.config.json5 and placed in the root directory. Any of the options set in serverSetup.js can be configured through the file, but those found in globalConfig are the most common to modify.

An example, sjrk.storyTelling.server.config.json5.example, has been provided as an example and can be used as a template to create your own configuration file.

{
    "type": "sjrk.storyTelling.server.config",
    "options": {
        "gradeNames": ["sjrk.storyTelling.server"],
        "components": {
            "server": {
                "options": {
                    "globalConfig": {
                        /*
                         * the HTTP port the server will be hosted from, default is 8081
                         * this only needs to be set if you intend to use a different port.
                         * for example, using port 443 for HTTPS
                         */
                        "port": "8081",

                        /*
                         * the custom theme to load in on top of the base theme
                         * for the base theme, simply remove, comment out or leave this setting empty
                         * available themes are: aihec, cities, karisma, learningReflections, sojustrepairit
                         */
                        "theme": "learningReflections",

                        /*
                         * a default file to load at the site root (e.g. index.html)
                         * if left blank or not set, this will default to storyBrowse.html
                         */
                        "themeIndexFile": "introduction.html",

                        /*
                         * if true, creating and saving stories to the database will be enabled
                         */
                        "authoringEnabled": true
                    }
                }
            }
        }
    }
}

Secrets

In addition to the above configuration options, there are others that are more private and you may not wish to store in a repository. For those you can make use of a secrets.json file which should be placed in the root directory of a running instance of the Storytelling tool. The secrets.json can be used to configure the admin password, session secret, https certificates, and configure how author credentials are encrypted.

For more information about the author credential options, see crypto.

An example, secrets.json.example, has been provided and can be used as a template to create your own file.

{
    "adminPass": "admin password",
    "session": "session secret",
    "authorCredentialConfig": {
        "digest": "hashing algorithm to use",
        "keyLength": Number, // An integer representing the desired key length
        "iterations": Number // An integer indicating the number of iterations used during encoding
    },
    "https": {
        "cert": "/path/to/certificate",
        "key": "/path/to/key"
    }
}