Skip to content

Commit

Permalink
wsとapiのURLをhostとは違うURLに設定できるように (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed May 24, 2024
1 parent 0a45e12 commit 8b3a5e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Config = {

import config from '../config.json' assert { type: 'json' };

config.wsUrl = config.host.replace('http', 'ws');
config.apiUrl = config.host + '/api';
config.wsUrl ??= config.host.replace('http', 'ws');
config.apiUrl ??= config.host + '/api';

export default config as Config;

0 comments on commit 8b3a5e6

Please sign in to comment.