mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Port path, host, port, listen_address and protocol config (no-changelog) (#10223)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Config, Nested } from './decorators';
|
||||
import { Config, Env, Nested } from './decorators';
|
||||
import { CredentialsConfig } from './configs/credentials';
|
||||
import { DatabaseConfig } from './configs/database';
|
||||
import { EmailConfig } from './configs/email';
|
||||
@@ -51,4 +51,24 @@ export class GlobalConfig {
|
||||
|
||||
@Nested
|
||||
readonly workflows: WorkflowsConfig;
|
||||
|
||||
/** Path n8n is deployed to */
|
||||
@Env('N8N_PATH')
|
||||
readonly path: string = '/';
|
||||
|
||||
/** Host name n8n can be reached */
|
||||
@Env('N8N_HOST')
|
||||
readonly host: string = 'localhost';
|
||||
|
||||
/** HTTP port n8n can be reached */
|
||||
@Env('N8N_PORT')
|
||||
readonly port: number = 5678;
|
||||
|
||||
/** IP address n8n should listen on */
|
||||
@Env('N8N_LISTEN_ADDRESS')
|
||||
readonly listen_address: string = '0.0.0.0';
|
||||
|
||||
/** HTTP Protocol via which n8n can be reached */
|
||||
@Env('N8N_PROTOCOL')
|
||||
readonly protocol: 'http' | 'https' = 'http';
|
||||
}
|
||||
|
||||
@@ -18,6 +18,11 @@ describe('GlobalConfig', () => {
|
||||
});
|
||||
|
||||
const defaultConfig: GlobalConfig = {
|
||||
path: '/',
|
||||
host: 'localhost',
|
||||
port: 5678,
|
||||
listen_address: '0.0.0.0',
|
||||
protocol: 'http',
|
||||
database: {
|
||||
logging: {
|
||||
enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user