2021-08-04 16:17:01 +00:00
|
|
|
//
|
|
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
|
|
// Copyright © 2021 Hardcore Engineering Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
import { start as startJsonRpc } from '@anticrm/server-ws'
|
2021-08-25 17:55:26 +00:00
|
|
|
import { createInMemoryAdapter } from '@anticrm/dev-storage'
|
|
|
|
import { createServerStorage } from '@anticrm/server-core'
|
2021-08-04 16:17:01 +00:00
|
|
|
|
2021-08-08 16:54:32 +00:00
|
|
|
import { addLocation } from '@anticrm/platform'
|
|
|
|
import { serverChunterId } from '@anticrm/server-chunter'
|
|
|
|
|
2021-08-04 16:17:01 +00:00
|
|
|
/**
|
|
|
|
* @public
|
|
|
|
*/
|
2021-08-04 17:13:14 +00:00
|
|
|
export async function start (port: number, host?: string): Promise<void> {
|
2021-08-18 19:46:59 +00:00
|
|
|
addLocation(serverChunterId, () => import('@anticrm/server-chunter-resources'))
|
2021-08-08 16:54:32 +00:00
|
|
|
|
2021-08-25 17:55:26 +00:00
|
|
|
startJsonRpc(() => createServerStorage(createInMemoryAdapter, '', ''), port, host)
|
2021-08-04 16:17:01 +00:00
|
|
|
}
|