ipld-eth-server/postgraphile/src/server/runtime.ts
Taka Goto d417b9cf3d expose graphiql; temporary comment out postgraphile subscription setup;
update subscription setup after doc was fixed
2018-09-07 11:23:28 -05:00

19 lines
428 B
TypeScript

import { ServerUtilities, ServerConfig } from './interface';
export function bootServer(
utilities: ServerUtilities,
config: ServerConfig
): void {
const expressApp = utilities.express();
expressApp.use(config.middleware);
const httpServer = utilities.httpServerFactory(expressApp);
utilities.enableSubscriptions(
httpServer,
config.middleware,
config.options);
httpServer.listen(config.port);
}