index.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. /* eslint-disable @typescript-eslint/no-this-alias */
  2. import http from 'http';
  3. import path from 'path';
  4. import { createTerminus } from '@godaddy/terminus';
  5. import { initMongooseGlobalSettings, getMongoUri, mongoOptions } from '@growi/core';
  6. import mongoose from 'mongoose';
  7. import pkg from '^/package.json';
  8. import CdnResourcesService from '~/services/cdn-resources-service';
  9. import InterceptorManager from '~/services/interceptor-manager';
  10. import Xss from '~/services/xss';
  11. import loggerFactory from '~/utils/logger';
  12. import { projectRoot } from '~/utils/project-dir-utils';
  13. import Activity from '../models/activity';
  14. import PageRedirect from '../models/page-redirect';
  15. import Tag from '../models/tag';
  16. import UserGroup from '../models/user-group';
  17. import AclService from '../service/acl';
  18. import AppService from '../service/app';
  19. import AttachmentService from '../service/attachment';
  20. import ConfigManager from '../service/config-manager';
  21. import { InstallerService } from '../service/installer';
  22. import PageService from '../service/page';
  23. import PageGrantService from '../service/page-grant';
  24. import PageOperationService from '../service/page-operation';
  25. import SearchService from '../service/search';
  26. import { SlackIntegrationService } from '../service/slack-integration';
  27. import { UserNotificationService } from '../service/user-notification';
  28. const logger = loggerFactory('growi:crowi');
  29. const httpErrorHandler = require('../middlewares/http-error-handler');
  30. const models = require('../models');
  31. const PluginService = require('../plugins/plugin.service');
  32. const sep = path.sep;
  33. function Crowi() {
  34. this.version = pkg.version;
  35. this.runtimeVersions = undefined; // initialized by scanRuntimeVersions()
  36. this.publicDir = path.join(projectRoot, 'public') + sep;
  37. this.resourceDir = path.join(projectRoot, 'resource') + sep;
  38. this.localeDir = path.join(this.resourceDir, 'locales') + sep;
  39. this.viewsDir = path.resolve(__dirname, '../views') + sep;
  40. this.tmpDir = path.join(projectRoot, 'tmp') + sep;
  41. this.cacheDir = path.join(this.tmpDir, 'cache');
  42. this.express = null;
  43. this.config = {};
  44. this.configManager = null;
  45. this.s2sMessagingService = null;
  46. this.mailService = null;
  47. this.passportService = null;
  48. this.globalNotificationService = null;
  49. this.userNotificationService = null;
  50. this.xssService = null;
  51. this.aclService = null;
  52. this.appService = null;
  53. this.fileUploadService = null;
  54. this.restQiitaAPIService = null;
  55. this.growiBridgeService = null;
  56. this.exportService = null;
  57. this.importService = null;
  58. this.searchService = null;
  59. this.socketIoService = null;
  60. this.pageService = null;
  61. this.syncPageStatusService = null;
  62. this.cdnResourcesService = new CdnResourcesService();
  63. this.interceptorManager = new InterceptorManager();
  64. this.slackIntegrationService = null;
  65. this.inAppNotificationService = null;
  66. this.activityService = null;
  67. this.commentService = null;
  68. this.xss = new Xss();
  69. this.tokens = null;
  70. this.models = {};
  71. this.env = process.env;
  72. this.node_env = this.env.NODE_ENV || 'development';
  73. this.port = this.env.PORT || 3000;
  74. this.events = {
  75. user: new (require('../events/user'))(this),
  76. page: new (require('../events/page'))(this),
  77. bookmark: new (require('../events/bookmark'))(this),
  78. comment: new (require('../events/comment'))(this),
  79. tag: new (require('../events/tag'))(this),
  80. admin: new (require('../events/admin'))(this),
  81. };
  82. }
  83. Crowi.prototype.init = async function() {
  84. await this.setupDatabase();
  85. await this.setupModels();
  86. await this.setupConfigManager();
  87. await this.setupSessionConfig();
  88. // setup messaging services
  89. await this.setupS2sMessagingService();
  90. await this.setupSocketIoService();
  91. // customizeService depends on AppService and XssService
  92. // passportService depends on appService
  93. // export and import depends on setUpGrowiBridge
  94. await Promise.all([
  95. this.setUpApp(),
  96. this.setUpXss(),
  97. this.setUpGrowiBridge(),
  98. ]);
  99. await Promise.all([
  100. this.scanRuntimeVersions(),
  101. this.setupPassport(),
  102. this.setupSearcher(),
  103. this.setupMailer(),
  104. this.setupSlackIntegrationService(),
  105. this.setupCsrf(),
  106. this.setUpFileUpload(),
  107. this.setUpFileUploaderSwitchService(),
  108. this.setupAttachmentService(),
  109. this.setUpAcl(),
  110. this.setUpCustomize(),
  111. this.setUpRestQiitaAPI(),
  112. this.setupUserGroupService(),
  113. this.setupExport(),
  114. this.setupImport(),
  115. this.setupPageService(),
  116. this.setupInAppNotificationService(),
  117. this.setupActivityService(),
  118. this.setupCommentService(),
  119. this.setupSyncPageStatusService(),
  120. ]);
  121. // globalNotification depends on slack and mailer
  122. await Promise.all([
  123. this.setUpGlobalNotification(),
  124. this.setUpUserNotification(),
  125. ]);
  126. await this.autoInstall();
  127. };
  128. Crowi.prototype.isPageId = function(pageId) {
  129. if (!pageId) {
  130. return false;
  131. }
  132. if (typeof pageId === 'string' && pageId.match(/^[\da-f]{24}$/)) {
  133. return true;
  134. }
  135. return false;
  136. };
  137. Crowi.prototype.setConfig = function(config) {
  138. this.config = config;
  139. };
  140. Crowi.prototype.getConfig = function() {
  141. return this.config;
  142. };
  143. Crowi.prototype.getEnv = function() {
  144. return this.env;
  145. };
  146. // getter/setter of model instance
  147. //
  148. Crowi.prototype.model = function(name, model) {
  149. if (model != null) {
  150. this.models[name] = model;
  151. }
  152. return this.models[name];
  153. };
  154. // getter/setter of event instance
  155. Crowi.prototype.event = function(name, event) {
  156. if (event) {
  157. this.events[name] = event;
  158. }
  159. return this.events[name];
  160. };
  161. Crowi.prototype.setupDatabase = function() {
  162. mongoose.Promise = global.Promise;
  163. // mongoUri = mongodb://user:password@host/dbname
  164. const mongoUri = getMongoUri();
  165. initMongooseGlobalSettings();
  166. return mongoose.connect(mongoUri, mongoOptions);
  167. };
  168. Crowi.prototype.setupSessionConfig = async function() {
  169. const session = require('express-session');
  170. const sessionMaxAge = this.configManager.getConfig('crowi', 'security:sessionMaxAge') || 2592000000; // default: 30days
  171. const redisUrl = this.env.REDISTOGO_URL || this.env.REDIS_URI || this.env.REDIS_URL || null;
  172. const uid = require('uid-safe').sync;
  173. // generate pre-defined uid for healthcheck
  174. const healthcheckUid = uid(24);
  175. const sessionConfig = {
  176. rolling: true,
  177. secret: this.env.SECRET_TOKEN || 'this is default session secret',
  178. resave: false,
  179. saveUninitialized: true,
  180. cookie: {
  181. maxAge: sessionMaxAge,
  182. },
  183. genid(req) {
  184. // return pre-defined uid when healthcheck
  185. if (req.path === '/_api/v3/healthcheck') {
  186. return healthcheckUid;
  187. }
  188. return uid(24);
  189. },
  190. };
  191. if (this.env.SESSION_NAME) {
  192. sessionConfig.name = this.env.SESSION_NAME;
  193. }
  194. // use Redis for session store
  195. if (redisUrl) {
  196. const redis = require('redis');
  197. const redisClient = redis.createClient({ url: redisUrl });
  198. const RedisStore = require('connect-redis')(session);
  199. sessionConfig.store = new RedisStore({ client: redisClient });
  200. }
  201. // use MongoDB for session store
  202. else {
  203. const MongoStore = require('connect-mongo');
  204. sessionConfig.store = MongoStore.create({ client: mongoose.connection.getClient() });
  205. }
  206. this.sessionConfig = sessionConfig;
  207. };
  208. Crowi.prototype.setupConfigManager = async function() {
  209. this.configManager = new ConfigManager();
  210. return this.configManager.loadConfigs();
  211. };
  212. Crowi.prototype.setupS2sMessagingService = async function() {
  213. const s2sMessagingService = require('../service/s2s-messaging')(this);
  214. if (s2sMessagingService != null) {
  215. s2sMessagingService.subscribe();
  216. this.configManager.setS2sMessagingService(s2sMessagingService);
  217. // add as a message handler
  218. s2sMessagingService.addMessageHandler(this.configManager);
  219. this.s2sMessagingService = s2sMessagingService;
  220. }
  221. };
  222. Crowi.prototype.setupSocketIoService = async function() {
  223. const SocketIoService = require('../service/socket-io');
  224. if (this.socketIoService == null) {
  225. this.socketIoService = new SocketIoService(this);
  226. }
  227. };
  228. Crowi.prototype.setupModels = async function() {
  229. let allModels = {};
  230. // include models that dependent on crowi
  231. allModels = models;
  232. // include models that independent from crowi
  233. allModels.Activity = Activity;
  234. allModels.Tag = Tag;
  235. allModels.UserGroup = UserGroup;
  236. allModels.PageRedirect = PageRedirect;
  237. Object.keys(allModels).forEach((key) => {
  238. return this.model(key, models[key](this));
  239. });
  240. };
  241. Crowi.prototype.scanRuntimeVersions = async function() {
  242. const self = this;
  243. const check = require('check-node-version');
  244. return new Promise((resolve, reject) => {
  245. check((err, result) => {
  246. if (err) {
  247. reject(err);
  248. }
  249. self.runtimeVersions = result;
  250. resolve();
  251. });
  252. });
  253. };
  254. Crowi.prototype.getSlack = function() {
  255. return this.slack;
  256. };
  257. Crowi.prototype.getSlackLegacy = function() {
  258. return this.slackLegacy;
  259. };
  260. Crowi.prototype.getInterceptorManager = function() {
  261. return this.interceptorManager;
  262. };
  263. Crowi.prototype.getGlobalNotificationService = function() {
  264. return this.globalNotificationService;
  265. };
  266. Crowi.prototype.getUserNotificationService = function() {
  267. return this.userNotificationService;
  268. };
  269. Crowi.prototype.getRestQiitaAPIService = function() {
  270. return this.restQiitaAPIService;
  271. };
  272. Crowi.prototype.setupPassport = async function() {
  273. logger.debug('Passport is enabled');
  274. // initialize service
  275. const PassportService = require('../service/passport');
  276. if (this.passportService == null) {
  277. this.passportService = new PassportService(this);
  278. }
  279. this.passportService.setupSerializer();
  280. // setup strategies
  281. try {
  282. this.passportService.setupStrategyById('local');
  283. this.passportService.setupStrategyById('ldap');
  284. this.passportService.setupStrategyById('saml');
  285. this.passportService.setupStrategyById('oidc');
  286. this.passportService.setupStrategyById('basic');
  287. this.passportService.setupStrategyById('google');
  288. this.passportService.setupStrategyById('github');
  289. this.passportService.setupStrategyById('twitter');
  290. }
  291. catch (err) {
  292. logger.error(err);
  293. }
  294. // add as a message handler
  295. if (this.s2sMessagingService != null) {
  296. this.s2sMessagingService.addMessageHandler(this.passportService);
  297. }
  298. return Promise.resolve();
  299. };
  300. Crowi.prototype.setupSearcher = async function() {
  301. this.searchService = new SearchService(this);
  302. };
  303. Crowi.prototype.setupMailer = async function() {
  304. const MailService = require('~/server/service/mail');
  305. this.mailService = new MailService(this);
  306. // add as a message handler
  307. if (this.s2sMessagingService != null) {
  308. this.s2sMessagingService.addMessageHandler(this.mailService);
  309. }
  310. };
  311. Crowi.prototype.setupCsrf = async function() {
  312. const Tokens = require('csrf');
  313. this.tokens = new Tokens();
  314. return Promise.resolve();
  315. };
  316. Crowi.prototype.autoInstall = function() {
  317. const isInstalled = this.configManager.getConfig('crowi', 'app:installed');
  318. const username = this.configManager.getConfig('crowi', 'autoInstall:adminUsername');
  319. if (isInstalled || username == null) {
  320. return;
  321. }
  322. logger.info('Start automatic installation');
  323. const firstAdminUserToSave = {
  324. username,
  325. name: this.configManager.getConfig('crowi', 'autoInstall:adminName'),
  326. email: this.configManager.getConfig('crowi', 'autoInstall:adminEmail'),
  327. password: this.configManager.getConfig('crowi', 'autoInstall:adminPassword'),
  328. admin: true,
  329. };
  330. const globalLang = this.configManager.getConfig('crowi', 'autoInstall:globalLang');
  331. const serverDate = this.configManager.getConfig('crowi', 'autoInstall:serverDate');
  332. const installerService = new InstallerService(this);
  333. try {
  334. installerService.install(firstAdminUserToSave, globalLang ?? 'en_US', serverDate);
  335. }
  336. catch (err) {
  337. logger.warn('Automatic installation failed.', err);
  338. }
  339. };
  340. Crowi.prototype.getTokens = function() {
  341. return this.tokens;
  342. };
  343. Crowi.prototype.start = async function() {
  344. // init CrowiDev
  345. if (this.node_env === 'development') {
  346. const CrowiDev = require('./dev');
  347. this.crowiDev = new CrowiDev(this);
  348. this.crowiDev.init();
  349. }
  350. await this.init();
  351. await this.buildServer();
  352. const { express, configManager } = this;
  353. // setup plugins
  354. this.pluginService = new PluginService(this, express);
  355. await this.pluginService.autoDetectAndLoadPlugins();
  356. const app = (this.node_env === 'development') ? this.crowiDev.setupServer(express) : express;
  357. const httpServer = http.createServer(app);
  358. // setup terminus
  359. this.setupTerminus(httpServer);
  360. // attach to socket.io
  361. this.socketIoService.attachServer(httpServer);
  362. // listen
  363. const serverListening = httpServer.listen(this.port, () => {
  364. logger.info(`[${this.node_env}] Express server is listening on port ${this.port}`);
  365. if (this.node_env === 'development') {
  366. this.crowiDev.setupExpressAfterListening(express);
  367. }
  368. });
  369. // listen for promster
  370. if (configManager.getConfig('crowi', 'promster:isEnabled')) {
  371. const { createServer } = require('@promster/server');
  372. const promsterPort = configManager.getConfig('crowi', 'promster:port');
  373. createServer({ port: promsterPort }).then(() => {
  374. logger.info(`[${this.node_env}] Promster server is listening on port ${promsterPort}`);
  375. });
  376. }
  377. // setup Express Routes
  378. this.setupRoutesAtLast();
  379. // setup Global Error Handlers
  380. this.setupGlobalErrorHandlers();
  381. return serverListening;
  382. };
  383. Crowi.prototype.buildServer = async function() {
  384. const env = this.node_env;
  385. const express = require('express')();
  386. require('./express-init')(this, express);
  387. // use bunyan
  388. if (env === 'production') {
  389. const expressBunyanLogger = require('express-bunyan-logger');
  390. const logger = loggerFactory('express');
  391. express.use(expressBunyanLogger({
  392. logger,
  393. excludes: ['*'],
  394. }));
  395. }
  396. // use morgan
  397. else {
  398. const morgan = require('morgan');
  399. express.use(morgan('dev'));
  400. }
  401. this.express = express;
  402. };
  403. Crowi.prototype.setupTerminus = function(server) {
  404. createTerminus(server, {
  405. signals: ['SIGINT', 'SIGTERM'],
  406. onSignal: async() => {
  407. logger.info('Server is starting cleanup');
  408. await mongoose.disconnect();
  409. return;
  410. },
  411. onShutdown: async() => {
  412. logger.info('Cleanup finished, server is shutting down');
  413. },
  414. });
  415. };
  416. /**
  417. * setup Express Routes
  418. * !! this must be at last because it includes '/*' route !!
  419. */
  420. Crowi.prototype.setupRoutesAtLast = function() {
  421. require('../routes')(this, this.express);
  422. };
  423. /**
  424. * setup global error handlers
  425. * !! this must be after the Routes setup !!
  426. */
  427. Crowi.prototype.setupGlobalErrorHandlers = function() {
  428. this.express.use(httpErrorHandler);
  429. };
  430. /**
  431. * require API for plugins
  432. *
  433. * @param {string} modulePath relative path from /lib/crowi/index.js
  434. * @return {module}
  435. *
  436. * @memberof Crowi
  437. */
  438. Crowi.prototype.require = function(modulePath) {
  439. return require(modulePath);
  440. };
  441. /**
  442. * setup GlobalNotificationService
  443. */
  444. Crowi.prototype.setUpGlobalNotification = async function() {
  445. const GlobalNotificationService = require('../service/global-notification');
  446. if (this.globalNotificationService == null) {
  447. this.globalNotificationService = new GlobalNotificationService(this);
  448. }
  449. };
  450. /**
  451. * setup UserNotificationService
  452. */
  453. Crowi.prototype.setUpUserNotification = async function() {
  454. if (this.userNotificationService == null) {
  455. this.userNotificationService = new UserNotificationService(this);
  456. }
  457. };
  458. /**
  459. * setup XssService
  460. */
  461. Crowi.prototype.setUpXss = async function() {
  462. const XssService = require('../service/xss');
  463. if (this.xssService == null) {
  464. this.xssService = new XssService(this.configManager);
  465. }
  466. };
  467. /**
  468. * setup AclService
  469. */
  470. Crowi.prototype.setUpAcl = async function() {
  471. if (this.aclService == null) {
  472. this.aclService = new AclService(this.configManager);
  473. }
  474. };
  475. /**
  476. * setup CustomizeService
  477. */
  478. Crowi.prototype.setUpCustomize = async function() {
  479. const CustomizeService = require('../service/customize');
  480. if (this.customizeService == null) {
  481. this.customizeService = new CustomizeService(this);
  482. this.customizeService.initCustomCss();
  483. this.customizeService.initCustomTitle();
  484. // add as a message handler
  485. if (this.s2sMessagingService != null) {
  486. this.s2sMessagingService.addMessageHandler(this.customizeService);
  487. }
  488. }
  489. };
  490. /**
  491. * setup AppService
  492. */
  493. Crowi.prototype.setUpApp = async function() {
  494. if (this.appService == null) {
  495. this.appService = new AppService(this);
  496. // add as a message handler
  497. const isInstalled = this.configManager.getConfig('crowi', 'app:installed');
  498. if (this.s2sMessagingService != null && !isInstalled) {
  499. this.s2sMessagingService.addMessageHandler(this.appService);
  500. }
  501. }
  502. };
  503. /**
  504. * setup FileUploadService
  505. */
  506. Crowi.prototype.setUpFileUpload = async function(isForceUpdate = false) {
  507. if (this.fileUploadService == null || isForceUpdate) {
  508. this.fileUploadService = require('../service/file-uploader')(this);
  509. }
  510. };
  511. /**
  512. * setup FileUploaderSwitchService
  513. */
  514. Crowi.prototype.setUpFileUploaderSwitchService = async function() {
  515. const FileUploaderSwitchService = require('../service/file-uploader-switch');
  516. this.fileUploaderSwitchService = new FileUploaderSwitchService(this);
  517. // add as a message handler
  518. if (this.s2sMessagingService != null) {
  519. this.s2sMessagingService.addMessageHandler(this.fileUploaderSwitchService);
  520. }
  521. };
  522. /**
  523. * setup AttachmentService
  524. */
  525. Crowi.prototype.setupAttachmentService = async function() {
  526. if (this.attachmentService == null) {
  527. this.attachmentService = new AttachmentService(this);
  528. }
  529. };
  530. /**
  531. * setup RestQiitaAPIService
  532. */
  533. Crowi.prototype.setUpRestQiitaAPI = async function() {
  534. const RestQiitaAPIService = require('../service/rest-qiita-API');
  535. if (this.restQiitaAPIService == null) {
  536. this.restQiitaAPIService = new RestQiitaAPIService(this);
  537. }
  538. };
  539. Crowi.prototype.setupUserGroupService = async function() {
  540. const UserGroupService = require('../service/user-group');
  541. if (this.userGroupService == null) {
  542. this.userGroupService = new UserGroupService(this);
  543. return this.userGroupService.init();
  544. }
  545. };
  546. Crowi.prototype.setUpGrowiBridge = async function() {
  547. const GrowiBridgeService = require('../service/growi-bridge');
  548. if (this.growiBridgeService == null) {
  549. this.growiBridgeService = new GrowiBridgeService(this);
  550. }
  551. };
  552. Crowi.prototype.setupExport = async function() {
  553. const ExportService = require('../service/export');
  554. if (this.exportService == null) {
  555. this.exportService = new ExportService(this);
  556. }
  557. };
  558. Crowi.prototype.setupImport = async function() {
  559. const ImportService = require('../service/import');
  560. if (this.importService == null) {
  561. this.importService = new ImportService(this);
  562. }
  563. };
  564. Crowi.prototype.setupPageService = async function() {
  565. if (this.pageService == null) {
  566. this.pageService = new PageService(this);
  567. }
  568. if (this.pageGrantService == null) {
  569. this.pageGrantService = new PageGrantService(this);
  570. }
  571. if (this.pageOperationService == null) {
  572. this.pageOperationService = new PageOperationService(this);
  573. // TODO: Remove this code when resuming feature is implemented
  574. await this.pageOperationService.init();
  575. }
  576. };
  577. Crowi.prototype.setupInAppNotificationService = async function() {
  578. const InAppNotificationService = require('../service/in-app-notification');
  579. if (this.inAppNotificationService == null) {
  580. this.inAppNotificationService = new InAppNotificationService(this);
  581. }
  582. };
  583. Crowi.prototype.setupActivityService = async function() {
  584. const ActivityService = require('../service/activity');
  585. if (this.activityService == null) {
  586. this.activityService = new ActivityService(this);
  587. }
  588. };
  589. Crowi.prototype.setupCommentService = async function() {
  590. const CommentService = require('../service/comment');
  591. if (this.commentService == null) {
  592. this.commentService = new CommentService(this);
  593. }
  594. };
  595. Crowi.prototype.setupSyncPageStatusService = async function() {
  596. const SyncPageStatusService = require('../service/system-events/sync-page-status');
  597. if (this.syncPageStatusService == null) {
  598. this.syncPageStatusService = new SyncPageStatusService(this, this.s2sMessagingService, this.socketIoService);
  599. // add as a message handler
  600. if (this.s2sMessagingService != null) {
  601. this.s2sMessagingService.addMessageHandler(this.syncPageStatusService);
  602. }
  603. }
  604. };
  605. Crowi.prototype.setupSlackIntegrationService = async function() {
  606. if (this.slackIntegrationService == null) {
  607. this.slackIntegrationService = new SlackIntegrationService(this);
  608. }
  609. // add as a message handler
  610. if (this.s2sMessagingService != null) {
  611. this.s2sMessagingService.addMessageHandler(this.slackIntegrationService);
  612. }
  613. };
  614. export default Crowi;