MCPcopy
hub / github.com/parse-community/parse-server / createGQLFromParseServer

Function createGQLFromParseServer

spec/ParseGraphQLServer.spec.js:442–463  ·  view source on GitHub ↗
(_parseServer, parseGraphQLServerOptions)

Source from the content-addressed store, hash-verified

440 }
441
442 async function createGQLFromParseServer(_parseServer, parseGraphQLServerOptions) {
443 if (parseLiveQueryServer) {
444 await parseLiveQueryServer.server.close();
445 }
446 if (httpServer) {
447 await httpServer.close();
448 }
449 const expressApp = express();
450 httpServer = http.createServer(expressApp);
451 expressApp.use('/parse', _parseServer.app);
452 parseLiveQueryServer = await ParseServer.createLiveQueryServer(httpServer, {
453 port: 1338,
454 });
455 parseGraphQLServer = new ParseGraphQLServer(_parseServer, {
456 graphQLPath: '/graphql',
457 playgroundPath: '/playground',
458 ...parseGraphQLServerOptions,
459 });
460 parseGraphQLServer.applyGraphQL(expressApp);
461 parseGraphQLServer.applyPlayground(expressApp);
462 await new Promise(resolve => httpServer.listen({ port: 13377 }, resolve));
463 }
464
465 beforeEach(async () => {
466 await createGQLFromParseServer(parseServer);

Callers 1

Calls 5

createServerMethod · 0.80
createLiveQueryServerMethod · 0.80
applyGraphQLMethod · 0.80
applyPlaygroundMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected