Skip to content

Commit

Permalink
feat(store-indexer,faucet): enable fastify compression (#1988)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Dec 1, 2023
1 parent 2699630 commit 6bae338
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/faucet/bin/faucet-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ const faucetAccount = privateKeyToAccount(env.FAUCET_PRIVATE_KEY);
// @see https://fastify.dev/docs/latest/
const server = fastify({
maxParamLength: 5000,
logger: true,
});

await server.register(import("@fastify/compress"));
await server.register(import("@fastify/cors"));

// k8s healthchecks
Expand Down
1 change: 1 addition & 0 deletions packages/faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"test:ci": "pnpm run test"
},
"dependencies": {
"@fastify/compress": "^6.5.0",
"@fastify/cors": "^8.3.0",
"@trpc/client": "10.34.0",
"@trpc/server": "10.34.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/store-indexer/bin/postgres-frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ const database = drizzle(postgres(env.DATABASE_URL));
// @see https://fastify.dev/docs/latest/
const server = fastify({
maxParamLength: 5000,
logger: true,
});

await server.register(import("@fastify/compress"));
await server.register(import("@fastify/cors"));

// k8s healthchecks
Expand Down
1 change: 1 addition & 0 deletions packages/store-indexer/bin/sqlite-indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const server = fastify({
maxParamLength: 5000,
});

await server.register(import("@fastify/compress"));
await server.register(import("@fastify/cors"));

// k8s healthchecks
Expand Down
1 change: 1 addition & 0 deletions packages/store-indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"test:ci": "pnpm run test"
},
"dependencies": {
"@fastify/compress": "^6.5.0",
"@fastify/cors": "^8.3.0",
"@latticexyz/block-logs-stream": "workspace:*",
"@latticexyz/common": "workspace:*",
Expand Down
131 changes: 128 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6bae338

Please sign in to comment.