feat(cloud): add deploy on remote worker

This commit is contained in:
Mauricio Siu
2024-10-03 23:46:26 -06:00
parent 767d3e1944
commit 388ded9aa5
10 changed files with 229 additions and 479 deletions

View File

@@ -0,0 +1,18 @@
import type { DeploymentJob } from "../queues/deployments-queue";
export const deploy = async (jobData: DeploymentJob) => {
try {
const result = await fetch("http://127.0.0.1:4000/deploy", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(jobData),
});
const data = await result.json();
console.log(data);
return data;
} catch (error) {
throw error;
}
};