fix: use the container URL for the preview panel

This commit is contained in:
James Murdza
2024-06-15 21:04:33 -04:00
parent cfed8a225e
commit 85ebfe4161
3 changed files with 11 additions and 2 deletions

View File

@ -132,6 +132,7 @@ io.on("connection", async (socket) => {
if (!containers[data.sandboxId]) {
containers[data.sandboxId] = await Sandbox.create();
console.log("Created container ", data.sandboxId);
io.emit("previewURL", "https://" + containers[data.sandboxId].getHostname(5173));
}
} catch (error) {
console.error("Error creating container ", data.sandboxId, error);