MCPcopy Create free account
hub / github.com/bautistaaa/narutoQL / createExpressServer

Function createExpressServer

src/server/createExpressServer.ts:7–20  ·  view source on GitHub ↗
(apolloServer: ApolloServer)

Source from the content-addressed store, hash-verified

5import { ApolloServer } from 'apollo-server-express';
6
7const createExpressServer = (apolloServer: ApolloServer): Express => {
8 const app = express();
9
10 app.use(morgan(':status | :method :url :response-time ms | :remote-addr'));
11
12 app.use(cors());
13 app.use(compression());
14
15 apolloServer.applyMiddleware({ app });
16
17 app.get('/', (_, res) => res.send('k it works Express + TypeScript Server'));
18
19 return app;
20};
21
22export default createExpressServer;

Callers 1

startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected