2019-03-11 13:39:16 +01:00
|
|
|
import { createServer } from "./graphql"
|
|
|
|
import typeormConfig from '../ormconfig'
|
|
|
|
import {createConnection} from "typeorm"
|
|
|
|
import { sendEmail} from "./post_office"
|
2018-10-07 21:33:47 +02:00
|
|
|
|
|
|
|
async function start() {
|
2019-03-11 13:39:16 +01:00
|
|
|
const server = await createServer({
|
|
|
|
typeormConnection: await createConnection(typeormConfig),
|
|
|
|
sendEmail,
|
2019-03-08 15:58:35 +01:00
|
|
|
})
|
2019-03-11 13:39:16 +01:00
|
|
|
server.listen().then(({url}) => {
|
|
|
|
console.log(`🚀 Server ready at ${url}`)
|
|
|
|
})
|
|
|
|
return server
|
2018-10-07 21:33:47 +02:00
|
|
|
}
|
2018-06-03 12:33:51 +02:00
|
|
|
|
2018-10-07 21:33:47 +02:00
|
|
|
start()
|