add authrorization to npx and docker installation

This commit is contained in:
Henry
2023-05-27 14:32:41 +01:00
parent eee6b4d74b
commit 626e1b29f8
5 changed files with 55 additions and 2 deletions
+9 -1
View File
@@ -1,4 +1,4 @@
import { Command } from '@oclif/core'
import { Command, Flags } from '@oclif/core'
import path from 'path'
import * as Server from '../index'
import * as DataSource from '../DataSource'
@@ -14,6 +14,10 @@ let processExitCode = EXIT_CODE.SUCCESS
export default class Start extends Command {
static args = []
static flags = {
USERNAME: Flags.string(),
PASSWORD: Flags.string()
}
async stopProcess() {
console.info('Shutting down Flowise...')
@@ -43,6 +47,10 @@ export default class Start extends Command {
console.error('uncaughtException: ', err)
})
const { flags } = await this.parse(Start)
if (flags.USERNAME) process.env.USERNAME = flags.USERNAME
if (flags.PASSWORD) process.env.PASSWORD = flags.PASSWORD
await (async () => {
try {
this.log('Starting Flowise...')