diff --git a/index.html b/index.html index 622b5b9..c4a5b05 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,10 @@ Domotique -

AH!

- +
+ DOMOTIQUE 3000 +
+

t

+ diff --git a/main.js b/main.js deleted file mode 100644 index ac6be2d..0000000 --- a/main.js +++ /dev/null @@ -1,2 +0,0 @@ -import './src/style.css'; -//import axios from 'axios'; diff --git a/src/api_requests.js b/src/api_requests.js new file mode 100644 index 0000000..6c41c8f --- /dev/null +++ b/src/api_requests.js @@ -0,0 +1,5 @@ +import axios from "axios"; + +export default async function getTemp(){ + return await axios.get("/api/temp.php"); +} \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..4f5034d --- /dev/null +++ b/src/main.js @@ -0,0 +1,6 @@ +import './style.css'; +import getTemp from './api_requests.js'; +getTemp() +.then((data) => { + document.getElementById("test").innerHTML = data; +}) \ No newline at end of file