Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleveille committed Nov 4, 2024
1 parent 4de513b commit 2ef8e0a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ primary_region = 'bos'

[http_service.concurrency]
type = "connections"
hard_limit = 1000
soft_limit = 1000
hard_limit = 500
soft_limit = 400

[[http_service.checks]]
grace_period = "10s"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"lint": "eslint . && prettier --check .",
"fix": "eslint --fix . && prettier --write .",
"deploy": "flyctl deploy --remote-only --detach --no-cache --config fly.toml",
"build": "bun ./scripts/build.ts",
"build:prod": "bun ./scripts/build.ts BUN_ENV=production && workbox injectManifest workbox-config.json",
"dev": "bun --watch ./src/server/index.ts",
Expand Down
3 changes: 2 additions & 1 deletion src/client/utils/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import type { TClientToServerSocketEvent, TServerToClientSocketEvent } from "@ty
import { Config } from "@utils";

export const socket: Socket<TServerToClientSocketEvent, TClientToServerSocketEvent> = io(
`ws://${location.hostname}:${Config.WS_PORT}`
`ws://${location.hostname}:${Config.WS_PORT}`,
{ withCredentials: true }
);

socket.on(SocketEvent.Reload, () => location.reload());
2 changes: 1 addition & 1 deletion src/server/helpers/ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { IS_PROD, WS_PORT, HOST, PORT } = Config;

export const initSocket = async () => {
const io = new Server<TClientToServerSocketEvent, TServerToClientSocketEvent>(WS_PORT, {
cors: { origin: [HOST, `${HOST}:${PORT}`] },
cors: { origin: [HOST, `${HOST}:${PORT}`], credentials: true },
serveClient: false
} as Partial<ServerOptions>);

Expand Down

0 comments on commit 2ef8e0a

Please sign in to comment.