Moved files
@ -33,6 +33,8 @@ io.on("connection", (client) => {
|
|||||||
io.sockets.emit("update-count", {value: usersConnected});
|
io.sockets.emit("update-count", {value: usersConnected});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.use(express.static("src"));
|
||||||
|
|
||||||
server.listen(3000, () => {
|
server.listen(3000, () => {
|
||||||
console.log("Server started on port 3000");
|
console.log("Server started on port 3000");
|
||||||
});
|
});
|
15
script.js
@ -1,15 +0,0 @@
|
|||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
var socket = io("https://danby.aniere.fr:3000");
|
|
||||||
|
|
||||||
socket.on("update-count", (data) => {
|
|
||||||
document.getElementById("value").innerText = data.value;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const swiper = new Swiper('.swiper', {
|
|
||||||
direction: "horizontal",
|
|
||||||
loop: true,
|
|
||||||
autoplay: true,
|
|
||||||
speed: 400,
|
|
||||||
spaceBetween: 100,
|
|
||||||
});
|
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 247 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 122 KiB |
22
src/script.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
|
||||||
|
try {
|
||||||
|
var socket = io("https://danby.aniere.fr:3000");
|
||||||
|
|
||||||
|
socket.on("update-count", (data) => {
|
||||||
|
document.getElementById("value").innerText = data.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
} catch(error) {
|
||||||
|
document.getElementById("value").innerText = "Serveur injoingnable !";
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
const swiper = new Swiper('.swiper', {
|
||||||
|
direction: "horizontal",
|
||||||
|
loop: true,
|
||||||
|
autoplay: true,
|
||||||
|
speed: 400,
|
||||||
|
spaceBetween: 100,
|
||||||
|
});
|