Backend and CSS #17

Merged
sageTheDm merged 9 commits from React-Group/interstellar_ai:main into main 2024-09-25 11:39:00 +02:00
Showing only changes of commit e31c7de7ab - Show all commits

16
app/backend/database.ts Normal file
View file

@ -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 })
})
}