gradido/backend/src/index.ts
2021-10-18 20:17:17 +02:00

26 lines
633 B
TypeScript

/* eslint-disable @typescript-eslint/no-explicit-any */
import createServer from './server/createServer'
// config
import CONFIG from './config'
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}/graphql`)
}
})
}
main().catch((e) => {
// eslint-disable-next-line no-console
console.error(e)
process.exit(1)
})