The Configuration page explains how to set up and customize your LiveGobe Website instance.
It covers directory structure, localization, and advanced options.
Configuration File
The config.js file centralizes all configuration settings for the project. It defines security policies, file paths, server options, database connections, and other essential parameters, allowing consistent configuration across environments (development, production) and simplifying maintenance.
Key Sections
- helmet: Security directives for HTTP headers using the Helmet middleware. Controls Content Security Policy (CSP), allowed sources for scripts, images, styles, fonts, forms, and more.
- source: Defines the root folder of your source code (
./src/). - pages: Configures default naming and folder structure for web pages, scripts, and styles. Helps the build system locate page resources.
- public: Settings for public assets, including development and production paths, bundle folders, and external library references (e.g., jQuery).
- render: HTML rendering options, such as doctype and prefix handling for static assets.
- mongodb: Connection URIs for development and production databases.
- session: Session management settings, including secret key, cookie age, and touch interval.
- filestorage: Path to file storage folder for uploaded files.
- port: The server port to listen on.
- domainName: The domain name of your site.
- server: Server-specific options, such as request timeout duration.
Directory Structure
Each LiveGobe Website instance has the following directory layout:
/bin - Contains back-end logic modules crucial for app functioning
/docs - Documentation for the project, such as manuals, guides, API references, or design notes
/locales - Localization files for different languages
/misc - Miscellaneous scripts that can assist in development
/models - Mongoose models, representing entities in the app
/routes - Route handlers for the application (API endpoints and page routing logic)
/src - The main source code of the project, including client-side logic modules and all pages
Each installation is self-contained.
To migrate or back up your instance, copy the entire directory and config.js file.
Localization
Localization files are stored under /locales/.json.
Each file (for example en.json, ru.json) contains translated interface and API strings.
To add a new language:
- Duplicate
/locales/en.json→/locales/xx.json - Translate each JSON file
- Update
supportedLanguagesin yourconfig.js
You can switch languages from the interface or by using query params in URL.
Related Pages
- Installation Guide — learn how to install and set up your wiki
- Editing Pages — discover how to edit with LGWL syntax
- Customization — style and script your wiki
- API v2 Reference — access programmatic API endpoints