gradido/backend/src/index.ts
Claus-Peter Huebner 3470a38efb linting
2023-08-02 23:54:33 +02:00

24 lines
717 B
TypeScript

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
})