I'm trying to do a very simple communication between ipcRenderer and IPCMain but it's not working ! can someone tell me why ?
GALLERY.JS
const { ipcRenderer } = require("electron");
document.addEventListener('DOMContentLoaded', (e) => {
ipcRenderer.send('test');
});
I really don't understand why nothing is printed in my console
GALERYCONTROLLER.JS
const { ipcMain} = require('electron');
const userId;
const Axios = require('axios')
ipcMain.on('test', (e) =>{
console.log('droneDataGallery received')
})
});
gallery.ejs
<link rel="stylesheet" href="../assets/css/GalleryPage.css"></link>
<div class='galleryPage'>
</div>
<script src="./../assets/js/gallery.js"></script>
Thanks a lot for your help !