eventcatalog.config.js
Overview
eventcatalog.config.js contains configurations for your site and is placed in the root directory of your site.
Required fields
cId
- Type:
string
An automated generated ID for your catalog. EventCatalog will generate this for you.
module.exports = {
cId: '107fdebb-7c68-42cc-975d-413b1d30d758',
};
title
- Type:
string
Title for your website.
module.exports = {
title: 'EventCatalog',
};
organizationName
- Type:
string
Your organization name.
module.exports = {
organizationName: 'Your Company',
};
Optional fields
base
- Type:
string - Default value:
/
The base path to deploy to. EventCatalog will use this path as the root for your pages and assets both in development and in production build.
module.exports = {
base: '/',
};
output
eventcatalog@2.35.4- Type:
string - Default value:
static
The output type for your EventCatalog, choose from static or server.
static- The default output type for EventCatalog. This will output a static website that you can host anywhere.server- This will output a Node.js server that you can host anywhere. This is required for certain features like the EventCatalog Chat (bring your own keys). The easiest way to host this is with our Docker image.
module.exports = {
output: 'static',
};
outDir
eventcatalog@2.11.4- Type:
string - Default value:
dist
The output path of your EventCatalog. By default it will output to the dist folder.
module.exports = {
// Catalog would output to the /build folder
outDir: 'build',
};
trailingSlash
- Type:
boolean - Default:
false
Set the route matching behavior of the dev server. Choose from the following options:
'true' - Only match URLs that include a trailing slash (ex: “/foo/“) 'false' - Match URLs regardless of whether a trailing ”/” exists
Use this configuration option if your production host has strict handling of how trailing slashes work or do not work.
module.exports = {
// Setting to true will add / onto all routes e.g http://website.com/visualiser/
trailingSlash: true,
};
port
- Type:
number - Default: 3000
Configure the port EventCatalog is running on.
module.exports = {
// Changes the port from default 3000 to 5000
port: 5000,
};
host
eventcatalog@2.42.9- Type:
string|boolean - Default:
false
Set which network IP addresses the dev server should listen on (i.e. non-localhost IPs).
false- do not expose on a network IP addresstrue- listen on all addresses, including LAN and public addresses[custom-address]- expose on a network IP address at[custom-address]
module.exports = {
host: '0.0.0.0',
};
server.allowedHosts
eventcatalog@2.64.0- Type:
string[]|true - Default:
[]
A list of hostnames that Astro is allowed to respond to. When the value is set to true, any hostname is allowed.
You can read more on the Astro documentation here.
module.exports = {
server: {
allowedHosts: ['example.com', 'subdomain.example.com'],
},
};
generators
- Type:
Generator[] - Default:
[]
Generators are the foundation of plugins with EventCatalog. EventCatalog will call your generators on build.
module.exports = {
generators: [
[
// This will load plugin.js in the root of your catalog
'<rootDir>/plugin.js',
// configuration for your generator
{
customValue: true,
test: "Add any configuration values you want"
},
],
],
};
environments
eventcatalog@2.48.2- Type:
object - Default:
{}
Optional configuration for EventCatalog environments.
When environments are set, a dropdown will be shown in the top right of the EventCatalog allowing your users to switch between environments.
module.exports = {
environments: [
{
// Name of the environment
name: 'Development',
// URL of the environment
url: 'https://demo.eventcatalog.dev',
// Description of the environment
description: 'Local development environment',
// Short name of the environment (optional, used in the dropdown)
shortName: 'Dev'
},
{
name: 'Test',
url: 'https://demo.eventcatalog.dev',
description: 'Test environment for QA',
shortName: 'Test'
},
{
name: 'Production',
url: 'https://demo.eventcatalog.dev',
description: 'Production environment',
shortName: 'Prod'
},
]
};