Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/server/src/app-supervisor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export class AppSupervisor extends EventEmitter implements AsyncEmitter {
}

setAppStatus(appName: string, status: AppStatus, options = {}) {
console.log('🚀 ~ AppSupervisor ~ setAppStatus ~ appName:', appName, status, options);
if (this.appStatus[appName] === status) {
return;
}
Expand Down
10 changes: 5 additions & 5 deletions packages/server/src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,11 +827,11 @@ export class Application<StateT = DefaultState, ContextT = DefaultContext> exten

this._started = true;

if (options.checkInstall && !(await this.isInstalled())) {
throw new ApplicationNotInstall(
`Application ${this.name} is not installed, Please run 'pnpm tachybase install' command first`,
);
}
// if (options.checkInstall && !(await this.isInstalled())) {
// throw new ApplicationNotInstall(
// `Application ${this.name} is not installed, Please run 'pnpm tachybase install' command first`,
// );
// }

this.setMaintainingMessage('starting app...');

Expand Down
14 changes: 7 additions & 7 deletions packages/server/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export default (app: Application) => {
app.logger.info('app has been started');
return;
}
if (!(await app.isInstalled())) {
app['_started'] = true;
throw new ApplicationNotInstall(
`Application ${app.name} is not installed, Please run 'pnpm tachybase install' command first`,
);
}
await app.load();
// if (!(await app.isInstalled())) {
// app['_started'] = true;
// throw new ApplicationNotInstall(
// `Application ${app.name} is not installed, Please run 'pnpm tachybase install' command first`,
// );
// }
// await app.load();
await app.start({
dbSync: options?.dbSync,
quickstart: options.quickstart,
Expand Down
7 changes: 0 additions & 7 deletions packages/server/src/gateway/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ export class Gateway extends EventEmitter {
const { pathname } = parse(req.url);
const { PLUGIN_STATICS_PATH, APP_PUBLIC_PATH } = process.env;

if (pathname.endsWith('/__umi/api/bundle-status')) {
res.statusCode = 200;
res.end('ok');
return;
}

if (pathname.startsWith(APP_PUBLIC_PATH + 'storage/uploads/')) {
req.url = req.url.substring(APP_PUBLIC_PATH.length - 1);
await compress(req, res);
Expand Down Expand Up @@ -248,7 +242,6 @@ export class Gateway extends EventEmitter {

if (appStatus === 'initialized') {
const appInstance = await AppSupervisor.getInstance().getApp(handleApp);
appInstance.runCommand('start', '--quickstart');
appStatus = AppSupervisor.getInstance().getAppStatus(handleApp);
}

Expand Down