mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
25 lines
773 B
TypeScript
25 lines
773 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
import { CONFIG } from './config'
|
|
import { startValidateCommunities } from './federation/validateCommunities'
|
|
import { createServer } from './server/createServer'
|
|
|
|
async function main() {
|
|
const { app } = await createServer()
|
|
|
|
app.listen(CONFIG.PORT, () => {
|
|
// eslint-disable-next-line no-console
|
|
console.log(`Server is running at http://localhost:${CONFIG.PORT}`)
|
|
if (CONFIG.GRAPHIQL) {
|
|
// eslint-disable-next-line no-console
|
|
console.log(`GraphIQL available at http://localhost:${CONFIG.PORT}`)
|
|
}
|
|
})
|
|
void startValidateCommunities(Number(CONFIG.FEDERATION_VALIDATE_COMMUNITY_TIMER))
|
|
}
|
|
|
|
main().catch((e) => {
|
|
// eslint-disable-next-line no-console
|
|
console.error(e)
|
|
throw e
|
|
})
|