Skip to content

Commit

Permalink
add compression package
Browse files Browse the repository at this point in the history
  • Loading branch information
efir-tractatus committed Oct 23, 2020
1 parent d59bfdb commit 76c0d46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { ApolloServer, gql } = require('apollo-server-express');
const express = require('express');
const cors = require('cors');
const path = require('path');
const compression = require('compression');
const db = require('../db/index.js');
const { resolvers } = require('./resolvers.js');
const { typeDefs } = require('./typeDefs.js');
Expand All @@ -17,12 +18,16 @@ const server = new ApolloServer({
server.applyMiddleware({ app });

app.use(cors());
app.use(compression());

// app.use((req, res) => {

// })

var filePath = path.join(__dirname, 'loaderio-a59b0f43e46db3a8a83b68daff4b4d1a.txt');
var filePath = path.join(
__dirname,
'loaderio-a59b0f43e46db3a8a83b68daff4b4d1a.txt'
);

app.get('/', (req, res) => {
res
Expand Down

0 comments on commit 76c0d46

Please sign in to comment.