mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 18:02:47 +08:00
refactor(server): reorganize server configs (#5753)
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
/// <reference types="./global.d.ts" />
|
||||
// keep the config import at the top
|
||||
// eslint-disable-next-line simple-import-sort/imports
|
||||
import './prelude';
|
||||
|
||||
import { Logger } from '@nestjs/common';
|
||||
|
||||
import { createApp } from './app';
|
||||
|
||||
const app = await createApp();
|
||||
const listeningHost = AFFiNE.deploy ? '0.0.0.0' : 'localhost';
|
||||
await app.listen(AFFiNE.port, listeningHost);
|
||||
|
||||
console.log(
|
||||
`AFFiNE Server has been started on http://${listeningHost}:${AFFiNE.port}.`
|
||||
);
|
||||
console.log(`And the public server should be recognized as ${AFFiNE.baseUrl}`);
|
||||
const logger = new Logger('App');
|
||||
|
||||
logger.log(`AFFiNE Server is running in [${AFFiNE.type}] mode`);
|
||||
logger.log(`Listening on http://${listeningHost}:${AFFiNE.port}`);
|
||||
logger.log(`And the public server should be recognized as ${AFFiNE.baseUrl}`);
|
||||
|
||||
Reference in New Issue
Block a user