Используя JS Electron, я хочу связаться с сервером с клиентом, у которого открыто приложение, и уведомить их, что их приложение устарело, например Steam
Я пробовал и смотрел на вещи, но они на самом деле не работают, и я использую Ubuntu Server 16.04
const {app, BrowserWindow} = require('electron')
const url = require('url');
const path = require('path')
var eNotify = require('electron-notify');
let win;
eNotify.setConfig({
appIcon: path.join(__dirname, 'misc/Dylan Parsons Logo.png'),
displayTime: 6000
});
function appn(){
eNotify.notify({
title: 'Thank You for Turning Notifications',
text: 'You Will be sent notifications when there is an update'
})
}
function createWindow(){
win = new BrowserWindow({width: 800, height: 600})
win.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file',
slashes: true
}))
}
app.on('ready', createWindow)
I want a notification telling the client that their app is out of date