Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 13a4617

Browse files
committed
set database url on cli
1 parent 2f3f80c commit 13a4617

File tree

4 files changed

+50
-11
lines changed

4 files changed

+50
-11
lines changed

examples/server/package-lock.json

Lines changed: 46 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"author": "kolserdav",
1212
"license": "MIT",
1313
"dependencies": {
14-
"uyem": "^1.0.8"
14+
"uyem": "^1.1.0"
1515
}
1616
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uyem",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"repository": "https://github.com/kolserdav/werift-sfu-react.git",
55
"description": "WebRTC client-server SFU application",
66
"keywords": [

packages/server/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { LogLevel } from './types/interfaces';
1818
//@ts-ignore
1919
// eslint-disable-next-line import/no-relative-packages
2020
import { name, version } from '../../../package';
21+
import { DATABASE_URL } from './utils/constants';
2122

2223
log('info', `${name}@${version} started`, '...', true);
2324
process.chdir(path.resolve(__dirname, '../../..'));
@@ -139,6 +140,7 @@ let skipMigrate = false;
139140
break;
140141
case 'db':
141142
db = argv.db || DEFAULT_PARAMS.db;
143+
process.env.DATABASE_URL = db || DATABASE_URL;
142144
if (db === DEFAULT_PARAMS.db && !skipMigrate) {
143145
log('warn', 'Parameter "db" not specified, using default:', DEFAULT_PARAMS.db, true);
144146
} else if (!skipMigrate) {

0 commit comments

Comments
 (0)