diff --git a/app/backend/database.ts b/app/backend/database.ts new file mode 100644 index 0000000..7b7437d --- /dev/null +++ b/app/backend/database.ts @@ -0,0 +1,16 @@ +import axios from "axios"; + +const sendToDatabase = (data: any) => { + axios.post("http://localhost:5000/interstellar_ai/db", data) + .then(response => { + const status = response.data.status + console.log(status); + postMessage({ status }) + console.log('message posted'); + + }) + .catch(error => { + console.log("Error calling Database:", error) + postMessage({ status: 500 }) + }) +} \ No newline at end of file