remote-deploy-cli 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +5 -5
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -195,15 +195,15 @@ program
|
|
|
195
195
|
.description('Start the server to listen for commands')
|
|
196
196
|
.option('-p, --port <port>', 'Port to listen on', 3000)
|
|
197
197
|
.action((options) => {
|
|
198
|
-
const port = options.port ||
|
|
199
|
-
const secret =
|
|
198
|
+
const port = options.port || getConfig('server_port') || process.env.SERVER_PORT || 3000;
|
|
199
|
+
const secret = getConfig('secret_key') || process.env.SECRET_KEY;
|
|
200
200
|
|
|
201
201
|
if (!secret) {
|
|
202
202
|
logger.warn('Warning: No "secret_key" set in config or SECRET_KEY env var. Communication might be insecure or fail if client requires it.');
|
|
203
203
|
logger.info('Run "redep config set secret_key <your-secret>" or set SECRET_KEY env var.');
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
const workingDir =
|
|
206
|
+
const workingDir = getConfig('working_dir') || process.env.WORKING_DIR;
|
|
207
207
|
if (!workingDir) {
|
|
208
208
|
logger.error('Error: "working_dir" is not set. Please set it using "redep config set working_dir <path>" or WORKING_DIR env var.');
|
|
209
209
|
process.exit(1);
|
|
@@ -217,8 +217,8 @@ program
|
|
|
217
217
|
.command('deploy <type>')
|
|
218
218
|
.description('Deploy a service (e.g., "fe") to the server machine')
|
|
219
219
|
.action(async (type) => {
|
|
220
|
-
const serverUrl =
|
|
221
|
-
const secret =
|
|
220
|
+
const serverUrl = getConfig('server_url') || process.env.SERVER_URL;
|
|
221
|
+
const secret = getConfig('secret_key') || process.env.SECRET_KEY;
|
|
222
222
|
|
|
223
223
|
if (!serverUrl) {
|
|
224
224
|
logger.error('Error: "server_url" is not set. Set SERVER_URL env var or run "redep config set server_url <url>"');
|