diff --git a/Dockerfile b/Dockerfile index cb30c94..3e0d6cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,6 @@ RUN bun install --frozen-lockfile --production COPY . /app ENV NODE_ENV production -ENTRYPOINT ["bun", "run", "start"] +ENTRYPOINT ["bun", "run", "server"] -EXPOSE 1234 1235 \ No newline at end of file +EXPOSE 1234 \ No newline at end of file diff --git a/client.ts b/client.ts index 28e57aa..5cd5562 100644 --- a/client.ts +++ b/client.ts @@ -15,7 +15,9 @@ async function main({ url }: { url: string }) { headers: data.headers, }) .then((res) => res.text()) - .then(socket.send); + .then((res) => { + socket.send(res); + }); } }); diff --git a/fly.toml b/fly.toml index 2d334c8..a031bec 100644 --- a/fly.toml +++ b/fly.toml @@ -1,7 +1,5 @@ # fly.toml app configuration file generated for tunnel on 2024-03-18T21:37:28-04:00 -# # See https://fly.io/docs/reference/configuration/ for information about how to use this file. -# app = 'tunnel' primary_region = 'yul' @@ -19,12 +17,4 @@ primary_region = 'yul' [[vm]] memory = '1gb' cpu_kind = 'shared' - cpus = 1 - -# [[services]] -# internal_port = 1235 -# protocol = "tcp" - -[[services.ports]] - handlers = ["tls", "http"] - port = 443 \ No newline at end of file + cpus = 1 \ No newline at end of file diff --git a/package.json b/package.json index 46e6660..200a69b 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, "scripts": { "server": "bun run server.ts", - "lt": "bun run client/index.ts", + "lt": "bun run client.ts", "demo": "bun run demo.ts" } }