|
@@ -176,8 +176,6 @@ Crowi.prototype.init = async function() {
|
|
|
this.setupExternalUserGroupSyncService(),
|
|
this.setupExternalUserGroupSyncService(),
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
- await this.autoInstall();
|
|
|
|
|
-
|
|
|
|
|
await normalizeData();
|
|
await normalizeData();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -414,7 +412,7 @@ Crowi.prototype.setupMailer = async function() {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-Crowi.prototype.autoInstall = function() {
|
|
|
|
|
|
|
+Crowi.prototype.autoInstall = async function() {
|
|
|
const isInstalled = this.configManager.getConfig('crowi', 'app:installed');
|
|
const isInstalled = this.configManager.getConfig('crowi', 'app:installed');
|
|
|
const username = this.configManager.getConfig('crowi', 'autoInstall:adminUsername');
|
|
const username = this.configManager.getConfig('crowi', 'autoInstall:adminUsername');
|
|
|
|
|
|
|
@@ -438,7 +436,7 @@ Crowi.prototype.autoInstall = function() {
|
|
|
const installerService = new InstallerService(this);
|
|
const installerService = new InstallerService(this);
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
- installerService.install(firstAdminUserToSave, globalLang ?? 'en_US', {
|
|
|
|
|
|
|
+ await installerService.install(firstAdminUserToSave, globalLang ?? 'en_US', {
|
|
|
allowGuestMode,
|
|
allowGuestMode,
|
|
|
serverDate,
|
|
serverDate,
|
|
|
});
|
|
});
|
|
@@ -485,6 +483,8 @@ Crowi.prototype.start = async function() {
|
|
|
instantiateYjsConnectionManager(this.socketIoService.io);
|
|
instantiateYjsConnectionManager(this.socketIoService.io);
|
|
|
this.socketIoService.setupYjsConnection();
|
|
this.socketIoService.setupYjsConnection();
|
|
|
|
|
|
|
|
|
|
+ await this.autoInstall();
|
|
|
|
|
+
|
|
|
// listen
|
|
// listen
|
|
|
const serverListening = httpServer.listen(this.port, () => {
|
|
const serverListening = httpServer.listen(this.port, () => {
|
|
|
logger.info(`[${this.node_env}] Express server is listening on port ${this.port}`);
|
|
logger.info(`[${this.node_env}] Express server is listening on port ${this.port}`);
|