25 lines
580 B
TypeScript
25 lines
580 B
TypeScript
import { i18n } from './i18n'
|
|
import { sdk } from './sdk'
|
|
|
|
export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => {
|
|
const multi = sdk.MultiHost.of(effects, 'ui')
|
|
|
|
const origin = await multi.bindPort(80, {
|
|
protocol: 'http',
|
|
preferredExternalPort: 80,
|
|
})
|
|
|
|
const ui = sdk.createInterface(effects, {
|
|
name: i18n('Web Interface'),
|
|
id: 'ui',
|
|
description: i18n('The main web interface'),
|
|
type: 'ui',
|
|
masked: false,
|
|
schemeOverride: null,
|
|
username: null,
|
|
path: '',
|
|
query: {},
|
|
})
|
|
|
|
return [await origin.export([ui])]
|
|
}) |