-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename server configuration variables for clarity and consi…
…stency
- Loading branch information
1 parent
7dfd2e8
commit 39b8d8d
Showing
10 changed files
with
37 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
TLDRAW_ASSETS_ALLOWED_MIME_TYPES_LIST : "image/png,image/jpeg,image/gif,image/svg+xml" | ||
TLDRAW_LOG_LEVEL: "error" | ||
TLDRAW_METRICS_COLLECT_DEFAULT: "true" | ||
TLDRAW_SERVER_ASSETS_ENABLED: "true" | ||
TLDRAW_ASSETS_ENABLED: "true" | ||
TLDRAW_WEBSOCKET_PATH: "/tldraw-server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
src/modules/server/server.config.ts → src/modules/server/tldraw-server.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
import { Transform } from 'class-transformer'; | ||
import { IsArray, IsBoolean, IsNumber, IsString, IsUrl } from 'class-validator'; | ||
|
||
export class ServerConfig { | ||
export class TldrawServerConfig { | ||
@IsString() | ||
public SERVER_WEBSOCKET_PATH = ''; | ||
public TLDRAW_WEBSOCKET_PATH = ''; | ||
|
||
@IsNumber() | ||
@Transform(({ value }) => parseInt(value)) | ||
public SERVER_WEBSOCKET_PORT = 3345; | ||
public TLDRAW_WEBSOCKET_PORT = 3345; | ||
|
||
@IsUrl({ protocols: ['wss', 'ws'], require_tld: false }) | ||
public SERVER_WEBSOCKET_URL!: string; | ||
public TLDRAW_WEBSOCKET_URL!: string; | ||
|
||
@Transform(({ value }) => value === 'true') | ||
@IsBoolean() | ||
public SERVER_ASSETS_ENABLED = true; | ||
public TLDRAW_ASSETS_ENABLED = true; | ||
|
||
@Transform(({ value }) => parseInt(value)) | ||
@IsNumber() | ||
public SERVER_ASSETS_MAX_SIZE_BYTES = 10485760; | ||
public TLDRAW_ASSETS_MAX_SIZE_BYTES = 10485760; | ||
|
||
@Transform(({ value }) => value.split(',')) | ||
@IsArray() | ||
public SERVER_ASSETS_ALLOWED_MIME_TYPES_LIST = ['image/png', 'image/jpeg', 'image/gif', 'image/svg+xml']; | ||
public TLDRAW_ASSETS_ALLOWED_MIME_TYPES_LIST = ['image/png', 'image/jpeg', 'image/gif', 'image/svg+xml']; | ||
|
||
@Transform(({ value }) => value === 'true') | ||
@IsBoolean() | ||
public SERVER_FEATURE_TLDRAW_ENABLED!: boolean; | ||
public FEATURE_TLDRAW_ENABLED!: boolean; | ||
} |