fix ports
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m19s
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 1m19s
This commit is contained in:
@@ -18,5 +18,5 @@ WORKDIR /app
|
|||||||
RUN apk add --no-cache ca-certificates
|
RUN apk add --no-cache ca-certificates
|
||||||
COPY --from=server_builder /app/main ./main
|
COPY --from=server_builder /app/main ./main
|
||||||
COPY --from=server_builder /app/build ./build
|
COPY --from=server_builder /app/build ./build
|
||||||
EXPOSE 8181
|
EXPOSE 3000
|
||||||
CMD ["./main"]
|
CMD ["./main"]
|
||||||
|
|||||||
17
server.ts
17
server.ts
@@ -1,17 +0,0 @@
|
|||||||
import { serve } from "bun";
|
|
||||||
|
|
||||||
serve({
|
|
||||||
port: 3000,
|
|
||||||
fetch(req) {
|
|
||||||
const url = new URL(req.url);
|
|
||||||
let path = url.pathname;
|
|
||||||
|
|
||||||
if (path === "/") path = "/index.html";
|
|
||||||
|
|
||||||
const file = Bun.file(`./build${path}`);
|
|
||||||
|
|
||||||
return new Response(file);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("Frontend listening on :3000");
|
|
||||||
Reference in New Issue
Block a user